Menu

#11 Segmentation fault with gcc 3.2.1

open
nobody
None
5
2002-11-18
2002-11-18
No

Doctorj 3.3.9 results in Segmentation fault at the very
start-up when compiled by gcc 3.2.1.

# gdb src/doctorj
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 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 "i386-undermydesk-
freebsd"...
(gdb) run /tmp/Foo.java
Starting program: /usr/local/src/doctorj-
3.3.9/src/doctorj /tmp/Foo.java

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) where
#0 0x00000000 in ?? ()
#1 0x0809d194 in App (this=0xbfbffad8, name=@0x20,
desc=@0x0) at App.cpp:156
#2 0x0804cee2 in DoctorJ (this=0xbfbffad8) at
stl_alloc.h:630
#3 0x0804e459 in main (argc=2, argv=0xbfbffc14) at
Main.cpp:7
#4 0x0804cc3c in _start ()

But it works fine when configured with the '--enable-
debug' flag.

This happens in the following environments.

* FreeBSD 5.0-CURRENT #0: Thu Nov 14 17:49:59 JST
2002
gcc version 3.2.1 [FreeBSD] 20021009 (prerelease)

* FreeBSD 4.7-PRERELEASE #94: Wed Sep 11
18:17:16 JST 2002
gcc version 3.2.1 20020902 (prerelease) [FreeBSD]

In the latter case, it works when compiled by gcc
version 2.95.4 20020320 [FreeBSD].

Is this a platform dependent issue?

Discussion

  • Ville Skyttä

    Ville Skyttä - 2003-01-20

    Logged In: YES
    user_id=32457

    I see this too, on Red Hat Linux 8.0:
    gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

    DoctorJ 3.3.9 built with RH's compatibility GCC (2.96) seems
    to work fine.

     
  • Sebastian von Knorring

    Logged In: YES
    user_id=696580

    Segfault also observed on a Gentoo 1.4 rc2 install
    (2.4.19-gentoo-r10) with g++ (GCC) 3.2.1 20021207 (Gentoo
    Linux 3.2.1-20021207). I installed DoctorJ from the source
    (.tar.gz) package.

    I'm not sure if this is relevant (I'm rather new to Linux),
    but some of the tests that are executed by the command 'make
    check' fail.

    I get for example the following:

    YagolOptionInputFile.t.cpp:102: failed: should have thrown
    exception
    yagol option boolean test results: failed

    and the following:

    YagolOptionOutputFile.t.cpp:101: failed: should have thrown
    exception
    yagol option boolean test results: failed

    and then in the end:

    ====================
    3 of 16 tests failed
    ====================

     
  • Paul Cupis

    Paul Cupis - 2003-02-02

    Logged In: YES
    user_id=95966

    I can also confirm this segfault problem on Debian/unstable
    with gcc (GCC) 3.2.2 20030131 (Debian prerelease).

     
  • Paul Cupis

    Paul Cupis - 2003-02-02

    Logged In: YES
    user_id=95966

    I can confirm this same problem with gcc (GCC) 3.2.2
    20030131 (Debian prerelease) on Debian/unstable and Linux
    2.4.19.

    Building with --enable-debug also allowed a usable binary to
    be built.

    --
    Paul Cupis

     
  • Ville Skyttä

    Ville Skyttä - 2003-02-25

    Logged In: YES
    user_id=32457

    Looks like this really got fixed in 4.0.0. Thanks!

     

Log in to post a comment.