Bug 73914

Summary: /usr/ports/lang/scm marked broken unjustifiedly due to Segmentation Fault
Product: Ports & Packages Reporter: dai inukai <inukai.d>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Makefile.diff
none
file.diff none

Description dai inukai 2004-11-13 22:30:20 UTC
When compiled with FreeBSD defaults (gcc-3.4.2), scmlit and scm crash
with "Segmentation Fault" in eval.c at the line 2090 with core dump:

eval.c: 2090 x = arg1;

If I trace the program with gdb and dumped core files, the variable
arg1 in the function "static SCM ceval_1(x)" disappears except when
compiled with the optimization option "-O0 (gcc default)."

This seems to be a gcc-3.4.2 bug because the program scompile and
work expectedly when compiled with gcc-3.4.3 from the port.

Fix: Use gcc-3.4.3 or later from the port or compile with
	"-DGCC_SPARC_BUG" if with gcc-3.4.2.
How-To-Repeat: /usr/ports/lang/scm% make
Comment 1 Volker Stolz freebsd_committer freebsd_triage 2004-11-15 09:01:16 UTC
State Changed
From-To: open->feedback

Can you please find out your current CFLAGS, e.g. 
cd /usr/ports/lang/scm && make -V CFLAGS? 
I don't see this on 4.10 with gcc 3.4.2 and -O2 (or do I need something else 
to test?) 

scm@menelaos [10:00:26]> work/scm/scm 
SCM version 5d9, Copyright (C) 1990-2002 Free Software Foundation. 
SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'. 
This is free software, and you are welcome to redistribute it 
under certain conditions; type `(terms)' for details. 
;loading /usr/ports/lang/scm/work/slib/require 
;done loading /usr/ports/lang/scm/work/slib/require.scm 
;loading /usr/ports/lang/scm/work/scm/Link 
;done loading /usr/ports/lang/scm/work/scm/Link.scm 
;loading /usr/ports/lang/scm/work/scm/Transcen 
;done loading /usr/ports/lang/scm/work/scm/Transcen.scm 
> ;EXIT 
scm@menelaos [10:00:35]> gcc34 -v 
Reading specs from /usr/local/lib/gcc/i386-portbld-freebsd4.10/3.4.2/specs 
Configured with: ./..//gcc-3.4-20040806/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --program-suffix=34 --with-gxx-include-dir=/usr/local/lib/gcc/i386-portbld-freebsd4.10/3.4.2/include/c++/ --disable-shared --prefix=/usr/local i386-portbld-freebsd4.10 
Thread model: posix 
gcc version 3.4.2 20040806 (prerelease) [FreeBSD]
Comment 2 Volker Stolz freebsd_committer freebsd_triage 2005-02-11 14:14:57 UTC
State Changed
From-To: feedback->closed

Feedback timeout