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

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

 



I'm unable to use the system g++ to compile it as removing any of the
includes breaks it, removing any of the -B arguments breaks it, but not
removing the -B arguments break it. Not exactly sure how to compile a
preprocessed file either. As it stands, I have been unable to reproduce the
error or change any of the flags, although I have been able to produce a
preprocessed file as per your instructions.

On Wed, May 18, 2022 at 7:59 PM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote:

> 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