GNOME Bugzilla – Bug 670350
Weird behavior in for loops in (ppc64 -mcpu=G5)
Last modified: 2012-03-03 13:33:15 UTC
Hello all, I've created the following javascript file: var i; for(i=0; i<2; ++i) { print(i); } and ran in through gjs 1.30.1 in two machines. Machine A: arch linux x86_64. Machine B: gentoo imacG5 ppc64 (compiled with CFLAGS="-mcpu=G5 -02 -pipe"). I have glib version 2.30.2 on both machines. When I run "$ gjs test.js" I get the two following behaviours: Machine A Output (x86_64): 0 1 Machine B Output (G5 ppc64): 1 4.2439915824e-314 1 4.2439915824e-314 1 4.2439915824e-314 ... (repeats forever) It also happens to crash gnome 3 (e.g. gdm or gnome-session) on my machine (With the "Oh no, something when wrong..." kind of problem) because of a loop in dbus.js (around line 256) executing one more iteration than it should. Please ask me for any extra information required for the bug.
Almost certainly a duplicate. *** This bug has been marked as a duplicate of bug 665152 ***
The latest git (together with the git gobject-introspection and glib) with the patched gi/function.c does not seem to improve the issue.
Does this happen with raw SpiderMonkey? gjs isn't really doing anything here.
I have found out that the same thing also happens in SpiderMonkey (1.8.5) js. I will try a hg SpiderMonkey build to see if they've somehow fixed the issue. It may help in identifying the problem.
Seems like this bug: https://bugzilla.redhat.com/show_bug.cgi?id=749604
Hello, Just to note that the bug is fixed in the recent checkouts of SpiderMonkey.