Tuesday, March 17, 2009

Two more kernel patches

This one is MIPS related, already accepted:
MIPS: Fix TIF_32BIT undefined problem when seccomp is disabled

This one is proc filesystem related:
[PATCH] filp->f_pos not correctly updated in proc_task_readdir

The later one is also MIPS related actually, in a peculiar way:
MIPS N32 does not have getdents64 system call. And because of readdir's implementation in glibc, this bug will be triggered when trying to run pstree or simply 'ls /proc/xxxx/task', where xxxx is the pid of a multithread process.

Labels:

Thursday, March 12, 2009

Firefox for MIPS N32 ABI

Finally, I could announce that it is working (tm).
I just submitted the patches (together with O32 ABI patch) to upstream.
https://bugzilla.mozilla.org/show_bug.cgi?id=482759

This is a big step forward for MIPS N32 GNU/Linux desktop.

One thing to note though: It (the N32 one) would encounter bus error on a few websites, e.g. www.sina.com.cn. I will try to find out why later when I have time.

For those who are into long stories, please read on:

I finally sorted out the font size problem, independently. It turned out that the problem is caused by strict aliasing issue in NSPR (NetScape Portable Runtime). Specifically, when parsing css file, in order to get the font size, PR_strtod() will be used to convert string to floating point value. But because of the strict aliasing issue, certain code in PR_strtod will be optimized out if -fstrict-aliasing is turned on, which is just the case if -O2 is used. And as a result, the floating point value would be wrong´╝î e.g. "1.5" will be converted to 15.0, "0.67" will become 67.0. At first, I thought it was a bug in gcc 4.4 (not released yet, but supports -march=loongson2f), since this problem does not exist if I used gcc 4.3. So I filed a gcc bug [1]. However, as Jakub Jelinek stated, this is actually a bug in NSPR [2].

PS: flameeyes just reminded me that this is not a problem of NSPR its own [3]. He is trying to find out all the packages that have used this dtoa.c. The list is not finished yet. But there is one thing for sure, there will be quite a few.

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39418
[2] https://bugzilla.redhat.com/show_bug.cgi?id=487844
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518927

Labels: , ,