This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCCC 2.95.3 compiled code on SPARC reproducably SIGBUS's



I have been able to reproduce this bug on Solaris 8 on a ultrasparc as
well.

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

Regards,

Aaron


On Tue, 8 Jan 2002, Joseph Mallett wrote:

> Hi,
>
> I'm working on the Hybrid7 IRCD on SPARC. In a piece of our code, GCC
> appears to be doing something very wrong that causes a reproducable NULL
> dereference, where the address is taken of a variable and put in a
> pointer, and over the lifetime of the function this occurs in, that
> pointer becomes a 0, and then is dereferenced to modify the contents of an
> element. OR at least, that's how it is looking to me. The code works
> properly on other platforms with GCC and other compilers. On SPARC SunPro
> seems to work fine.
>
> Here is the output of compiling the problematic file with -v:
> Reading specs from /usr/lib/gcc-lib/sparc-unknown-openbsd3.0/2.95.3/specs
> gcc version 2.95.3 20010125 (prerelease)
>  /usr/lib/gcc-lib/sparc-unknown-openbsd3.0/2.95.3/cpp0 -lang-c -v
> -I../include -I/usr/local/include -D__GNUC__=2 -D__GNUC_MINOR__=95
> -D__unix__ -D__sparc__ -D__OpenBSD__ -D__unix__ -D__sparc__ -D__OpenBSD__
> -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)
> -D__OPTIMIZE__ -g -ggdb -g -Wunused -Wall -Wshadow -Wmissing-declarations
> -DIRCD_PREFIX="/usr/local/ircd" s_serv.c s_serv.i
> GNU CPP version 2.95.3 20010125 (prerelease) (sparc)
> #include "..." search starts here:
> #include <...> search starts here:
>  ../include
>  /usr/local/include
>  /usr/include
> End of search list.
> The following default directories have been omitted from the search path:
>  /usr/include/g++
> End of omitted list.
>  /usr/lib/gcc-lib/sparc-unknown-openbsd3.0/2.95.3/cc1 s_serv.i -quiet
> -dumpbase s_serv.c -g -ggdb -g -O2 -O2 -Wunused -Wall -Wshadow
> -Wmissing-declarations -version -o s_serv.s
> GNU C version 2.95.3 20010125 (prerelease) (sparc-unknown-openbsd3.0)
> compiled by GNU C version 2.95.3 20010125 (prerelease).
>  as -o s_serv.o s_serv.s
>
> The .i file is attached. core dumps and binaries are available from me on
> request.
>
> Thanks,
> 	Joseph
>
> --
> Joseph Mallett jmallett@newgold.net
> Need a modular BSD solution? www.xMach.org
> Resume: http://srcsys.org/resume.txt
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]