Saturday, February 11, 2006

Solve the Firefox SIGSEGV tonight.

My Firefox crashed many times after the upgrade to 1.5 in my Debian box. Tonight, I use strace to track the execution of Firefox and I found the following error message when I was trying to open a Chinese website.

open("/usr/X11R6/lib/X11/fonts/ttf/simsun.ttc", O_RDONLY) = -1 EACCES (Permission denied)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---


Then, I figured out that the simsun.ttc is not accessible, with mode -r--------. After I change the mode to -r--r--r--, the Firefox won't crash now. So, I guess that the SIGSEGV was caused by a null pointer returned by the file open operation. Forget to check the null pointer, Firefox crashed.

No comments: