Re: gcc on mipsel: -O2 leads to SEGFAULT on very large function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/06/10 16:57, Willi Mann wrote:
> Hi!
> 
> I came over this bug after the latest upload of enigmail to debian. The 
> build only failed on mips and on mipsel, on mipsel with the message "Bus 
> error". 
> 
> https://buildd.debian.org/fetch.cgi?pkg=enigmail;ver=2%3A1.0.1-2;arch=mipsel;stamp=1275567604
> 
> The command "install-xpi" that exposes this bus error is a python script. It 
> uses the package python-rdflib, which is an RDF library. The parser for the 
> supported RDF query language is generated C code. 
> 
> I don't have shell access to a mipsel machine, so I did all my tests in qemu 
> using -M malta as machine type.
> 
> The first thing I tried is to compile without optimization. The error no 
> longer occured. 
> 
> So I tried to reduce the largest function in the generated parser by 
> removing debug code first that shouldn't change the results. Unfortunately, 
> after the removal of one type of these debug blocks, the "Bus error" no 
> longer occured. 
> 
> So I did a binary search on the number of blocks I could remove before the 
> problem disappears. The result is that I have two versions of the parser 
> that only differ in 8 lines with one exposing the bug, the other not. 
> 
> The command-line is 
> $ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-
> prototypes -g -O2 -fPIC -I/usr/include/python2.5 -c src/bison/SPARQLParser.c 
> -o build/temp.linux-mips-2.5/src/bison/SPARQLParser.o
> 
> The two versions of the parser are available from
> 
> http://wserver.wm1.at/~willi/debian/gcc_mipsel_bug/
> 
> The source package is available from
> 
> http://packages.debian.org/source/sid/rdflib
> 
> A stripped down version of install-xpi that's enough to trigger the bug is 
> available from the following Debian bug:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584327
> 
> It's then enough to run 
> $ ./install-xpi install.rdf 
> 
> to trigger the bug.
> 
> Is this a gcc bug?

Maybe, maybe not.

Do you get any compiler warnings, with full warnings enabled?

What is the code that faults?

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux