public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/10630: scsh built with -O2 gives bus error (-O0 does not)
@ 2003-05-06 14:23 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-05-06 14:23 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, stktrc

Synopsis: scsh built with -O2 gives bus error (-O0 does not)

State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Tue May  6 14:23:37 2003
State-Changed-Why:
    No feedback to be expected

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10630


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: optimization/10630: scsh built with -O2 gives bus error (-O0 does not)
@ 2003-05-05 16:41 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-05-05 16:41 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, stktrc

Synopsis: scsh built with -O2 gives bus error (-O0 does not)

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Mon May  5 16:41:44 2003
State-Changed-Why:
    That's not enough information for us to reproduce the problem.
    Please review
      http://gcc.gnu.org/bugs.html
    to see what we need.
    
    Thanks
      Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10630


^ permalink raw reply	[flat|nested] 3+ messages in thread

* optimization/10630: scsh built with -O2 gives bus error (-O0 does not)
@ 2003-05-05 15:46 stktrc
  0 siblings, 0 replies; 3+ messages in thread
From: stktrc @ 2003-05-05 15:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10630
>Category:       optimization
>Synopsis:       scsh built with -O2 gives bus error (-O0 does not)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 05 15:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     stktrc@yahoo.com
>Release:        3.2
>Organization:
>Environment:
Solaris 8 (SunOS 5.8)
>Description:
The build of scsh uses -O2 for optimization by default.  This results in the command "scsh -o srfi-27 -c 1" giving a bus error roughly 50% of the times it is invoked.  The rest of the times it works without a problem.

This is only observed on Solaris.  This could not be reproduced on Linux for example.

Here is a backtrace:

$ /tmp/scsh/lib/scsh/scshvm -o /tmp/scsh/lib/scsh/scshvm -i /tmp/scsh/lib/scsh/scsh.image -o srfi-27
zsh: bus error (core dumped)  /tmp/scsh/lib/scsh/scshvm -o /tmp/scsh/lib/scsh/scshvm -i  -o srfi-27
$ gdb /tmp/scsh/lib/scsh/scshvm core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
Core was generated by `/tmp/scsh/lib/scsh/scshvm -o /tmp/scsh/lib/scsh/scshvm -i /tmp/scsh/lib/scsh/sc'.
Program terminated with signal 10, Bus Error.
Reading symbols from /usr/lib/libelf.so.1...done.
Loaded symbols for /usr/lib/libelf.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libgen.so.1...done.
Loaded symbols for /usr/lib/libgen.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
#0  0x55a1c in mrg32k3a_pack_state1 (state=6547739) at c/srfi/srfi-27.c:135
135       S48_SET_VALUE(result, state_t, s);
(gdb) bt
#0  0x55a1c in mrg32k3a_pack_state1 (state=6547739) at c/srfi/srfi-27.c:135
#1  0x43c70 in s48_external_call (sch_proc=5111115, proc_name=5111123, nargs=1, char_argv=0x138deb4 "") at c/external.c:162
#2  0x2ad44 in s48_restart (proc_361X=465955, nargs_362X=5) at c/scheme48vm.c:6996
#3  0x386e0 in s48_call_startup_procedure (startup_vector_1335X=0xffbef838, startup_vector_length_1336X=2) at c/scheme48vm.c:10897
#4  0x16864 in internal_s48_main (heap_size=5000000, stack_size=2500, _prog_name=0xffbef97c "/tmp/scsh/lib/scsh/scshvm", 
    object_file=0xffbef999 "/tmp/scsh/lib/scsh/scshvm", image_name=0xffbef9b6 "/tmp/scsh/lib/scsh/scsh.image", argc=2, argv=0xffbef838) at c/init.c:109
#5  0x1614c in main (argc=2, argv=0xffbef838) at c/main.c:72
(gdb) 
>How-To-Repeat:
download ftp://ftp.scsh.net/pub/scsh/0.6/scsh-0.6.4.tar.gz
tar xzf scsh-0.6.4.tar.gz
cd scsh-0.6.4
./configure
make
make install
scsh -o srfi-27 -c 1

bus error!
>Fix:
Work around: By exporting the environment variable CFLAGS with value "-O0" to disable optimizations during the build as described above, a build of scsh where the bus error does not occur is produced.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-06 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 14:23 optimization/10630: scsh built with -O2 gives bus error (-O0 does not) bangerth
  -- strict thread matches above, loose matches on Subject: below --
2003-05-05 16:41 bangerth
2003-05-05 15:46 stktrc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).