Opened 13 years ago

Closed 13 years ago

#7037 closed bug (invalid)

Jam exits with "segmentation fault" on OpenSuse 11.1

Reported by: jackburton Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description (last modified by jackburton)

Jam can't compile haiku in OpenSuse 11.1 (and subsequent releases, I guess), after thinking for a while, it causes a segmentation fault. This seems to be caused by a strict aliasing violation on GCC > 4.2 (OpenSuse 11.1 uses 4.3.2).

The fix (besides fixing jam's strict aliasing violations) is to add "-fno-strict-aliasing" to the CFLAGS in Jam's makefile.

Change History (4)

comment:1 by jackburton, 13 years ago

Description: modified (diff)

in reply to:  description ; comment:2 by bonefish, 13 years ago

Replying to jackburton:

Jam can't compile haiku in OpenSuse 11.1 (and subsequent releases, I guess), after thinking for a while, it causes a segmentation fault. This seems to be caused by a strict aliasing violation on GCC > 4.2 (OpenSuse 11.1 uses 4.3.2).

The fix (besides fixing jam's strict aliasing violations) is to add "-fno-strict-aliasing" to the CFLAGS in Jam's makefile.

Interestingly, I haven't had any trouble under 11.2 and 11.3 (32 and 64 bit). I vaguely recall a patch floating around on the Jamming mailing list to fix the aliasing issues, but I'm too lazy to search them. Please just apply your change, if that fixes the issue for you (in the Jamfile, too).

in reply to:  2 comment:3 by jackburton, 13 years ago

Replying to bonefish:

Interestingly, I haven't had any trouble under 11.2 and 11.3 (32 and 64 bit). I vaguely recall a patch floating around on the Jamming mailing list to fix the aliasing issues, but I'm too lazy to search them. Please just apply your change, if that fixes the issue for you (in the Jamfile, too).

I just realized that the change wouldn't work if jam was compiled with gcc2 (which doesn't support the -fno-strict-aliasing option). So the change would need to be added only for gcc > 3. I'll see if I can find the patch you were talking about.

in reply to:  2 comment:4 by jackburton, 13 years ago

Resolution: invalid
Status: newclosed

Replying to bonefish:

Interestingly, I haven't had any trouble under 11.2 and 11.3 (32 and 64 bit).

Turns out to be a bug in GCC, related to strict-aliasing. I ran an update (It had been a while since I did that last time) and I got a new gcc version, which doesn't have the problem. Closing as invalid.

Note: See TracTickets for help on using tickets.