Re: Segfault in libjava/prims.cc while compiling gcj

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

 



On Wed, 2022-05-18 at 19:23 +1000, Zopolis0 via Gcc-help wrote:

/* snip */

> ../../../../gcj/libjava/prims.cc:182:23: internal compiler error:
> Segmentation fault

/* snip */

> Is this an error within prims.cc?

No.  No matter prims.cc is erroneous or not, the compiler should not
crash.

> Or is it catching an error from somewhere else?

It indicates a bug in the compiler.

> Should I report this as per the instructions?

Maybe.  We don't know if you introduced the bug or the bug has been
already in GCC trunk.

Try to get a preprocessed file (by changing "-c" to "-E" in the command
line, and "-o prims.o" to "-o prims.ii").  Then compile prims.ii using
*unmodified and latest* g++ trunk with all flags (esp. -m32, -Ox, and -
f...) in the command line.  But "-D...", "-I...", and "-B..." shall be
removed.

If the segfault can be reproduced with unmodified g++ trunk with the
instruction above, try to remove some flags (for example, remove -m32,
change -O2 to -O1 or -O0, etc) and get a minimal set of flags to produce
the crash.  Then use cvise (https://github.com/marxin/cvise) to reduce
prims.ii into a test case and report via https://gcc.gnu.org/bugzilla
with the test case attached.

If the segfault can't be reproduced with latest g++ trunk and the
preprocessed file, you can try to rebase your changes onto the latest
trunk.  If the crash still happens for the rebased code, it indicates
you've done something wrong modifying GCC.  You can still use cvise to
get a minimal test case to reproduce the crash for you, and then use a
debugger (like gdb) to figure out what's going wrong.
-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University




[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