public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1
@ 2004-12-02 22:33 Albert Chin
  2004-12-03  0:08 ` Joe Buck
  0 siblings, 1 reply; 5+ messages in thread
From: Albert Chin @ 2004-12-02 22:33 UTC (permalink / raw)
  To: gcc

Just build Qt-3.3.3 with GCC 3.4.2 and 3.4.3 on Redhat Linux 7.1/x86
and RHEL 2.1/x86. No problems with 3.4.2. However, when building with
3.4.3, I get a segfault during the build:
  ...
  /opt/build/qt-x11-free-3.3.2/bin/uic -L
  /opt/build/qt-x11-free-3.3.2/plugins projectsettings.ui -i
  projectsettings.h -o projectsettings.cpp
  gmake[4]: *** [projectsettings.cpp] Segmentation fault (core dumped)

Trying to debug it (with gdb-6.3):
  $ cd /opt/build/qt-x11-free-3.3.3/tools/designer/plugins/cppeditor
  $ gdb /opt/build/qt-x11-free-3.3.2/bin/uic core
  gdb> bt
  #0  0x40e6c36c in ?? ()
  #1  0x40ce456b in exit (status=0) at exit.c:54
  #2  0x40ccf690 in __libc_start_main (main=0x8051550 <main>, argc=8, 
      ubp_av=0xbffed604, init=0x80501bc <_init>, fini=0x808bfa0 <_fini>, 
      rtld_fini=0x4000dda4 <_dl_fini>, stack_end=0xbffed5fc)
      at ../sysdeps/generic/libc-start.c:129
  #3  0x08051361 in _start ()

I tried adding print statements to main() but it didn't help. The last
statement in main() is 'return 0;' and everything works ok up until
this point. The SEGV appears _after_ the return statement.

$ gcc -v
Reading specs from
/opt/TWWfsw/gcc343/lib/gcc/i686-redhat-linuxe2.1/3.4.3/specs
Configured with: /opt/build/gcc-3.4.3/configure
--with-included-gettext --enable-libgcj --enable-__cxa_atexit
--with-gnu-as --with-as=/opt/TWWfsw/gcc343/i686-redhat-linuxe2.1/bin/as
--with-gnu-ld --with-ld=/opt/TWWfsw/gcc343/i686-redhat-linuxe2.1/bin/ld
--datadir=/opt/TWWfsw/gcc343/share --host=i686-redhat-linuxe2.1
--with-local-prefix=/opt/TWWfsw/gcc343 --prefix=/opt/TWWfsw/gcc343
Thread model: posix
gcc version 3.4.3 (TWW)

Both 3.4.2 and 3.4.3 are built against binutils-2.15 as/ld. According
to http://gcc.gnu.org/install/specific.html#*-*-linux*:
  Versions of libstdc++-v3 starting with 3.2.1 require bugfixes
  present in glibc 2.2.5 and later. More information is available
  in the libstdc++-v3 documentation.

From the libstdc++-v3 documentation, this requirement is for a locale
issue so I don't think it's the cause for the above problem.

Redhat Linux 9/x86, RHEL 3.0/x86, and RHEL 3.0/amd64 work fine. I
reviewed http://gcc.gnu.org/gcc-3.4/changes.html#3.4.3 but nothing
stands out as to what causes this. Where should I start looking?

-- 
albert chin (china@thewrittenword.com)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1
  2004-12-02 22:33 SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1 Albert Chin
@ 2004-12-03  0:08 ` Joe Buck
  2004-12-03 17:13   ` Albert Chin
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joe Buck @ 2004-12-03  0:08 UTC (permalink / raw)
  To: gcc

On Thu, Dec 02, 2004 at 04:33:02PM -0600, Albert Chin wrote:
> Just build Qt-3.3.3 with GCC 3.4.2 and 3.4.3 on Redhat Linux 7.1/x86
> and RHEL 2.1/x86. No problems with 3.4.2. However, when building with
> 3.4.3, I get a segfault during the build:
>   ...
> Redhat Linux 9/x86, RHEL 3.0/x86, and RHEL 3.0/amd64 work fine. I
> reviewed http://gcc.gnu.org/gcc-3.4/changes.html#3.4.3 but nothing
> stands out as to what causes this. Where should I start looking?

Are you saying that you get a segfault when you build with 3.4.3 on RHEL
2.1, but not when you build with 3.4.3 on RHEL 3.0 or RH9?  If so, this
doesn't sound like the compiler is at fault.  A KDE developers' list might
be a better place to track this one down, but I don't see any alternative
to just debugging the problem.  If the blowup is in a place where there
appears to be no code, it's probably in a destructor.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1
  2004-12-03  0:08 ` Joe Buck
@ 2004-12-03 17:13   ` Albert Chin
  2004-12-07 15:56   ` Nix
  2004-12-09 20:46   ` Michael Matz
  2 siblings, 0 replies; 5+ messages in thread
From: Albert Chin @ 2004-12-03 17:13 UTC (permalink / raw)
  To: gcc

On Thu, Dec 02, 2004 at 04:08:06PM -0800, Joe Buck wrote:
> On Thu, Dec 02, 2004 at 04:33:02PM -0600, Albert Chin wrote:
> > Just build Qt-3.3.3 with GCC 3.4.2 and 3.4.3 on Redhat Linux 7.1/x86
> > and RHEL 2.1/x86. No problems with 3.4.2. However, when building with
> > 3.4.3, I get a segfault during the build:
> >   ...
> > Redhat Linux 9/x86, RHEL 3.0/x86, and RHEL 3.0/amd64 work fine. I
> > reviewed http://gcc.gnu.org/gcc-3.4/changes.html#3.4.3 but nothing
> > stands out as to what causes this. Where should I start looking?
> 
> Are you saying that you get a segfault when you build with 3.4.3 on RHEL
> 2.1, but not when you build with 3.4.3 on RHEL 3.0 or RH9?  If so, this
> doesn't sound like the compiler is at fault.  A KDE developers' list might
> be a better place to track this one down, but I don't see any alternative
> to just debugging the problem.  If the blowup is in a place where there
> appears to be no code, it's probably in a destructor.

Sorry, my fault. I incorrectly installed binutils-2.15 so gcc-3.4.3
never built against it.

-- 
albert chin (china@thewrittenword.com)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1
  2004-12-03  0:08 ` Joe Buck
  2004-12-03 17:13   ` Albert Chin
@ 2004-12-07 15:56   ` Nix
  2004-12-09 20:46   ` Michael Matz
  2 siblings, 0 replies; 5+ messages in thread
From: Nix @ 2004-12-07 15:56 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

On 3 Dec 2004, Joe Buck said:
>                                 If the blowup is in a place where there
> appears to be no code, it's probably in a destructor.

I've also seen sibcalls trigger this in cases where the sibcalled
function's prototype is different from its declaration; when the
sibcalled function returns, you can get a segfault because sibcalling
kicked in when the function's true declaration would have suppressed
it, and the return mangles the stack.

(Of course GCC warns about this case, and of course it couldn't be the
cause of a crash at the end of main(), as main() can't be sibcalled. Now
we're using -funit-at-a-time for everything, GCC may well be smart
enough to spot that sibcalling is unusable even in the presence of this
programmer error.)

-- 
`The sword we forged has turned upon us
 Only now, at the end of all things do we see
 The lamp-bearer dies; only the lamp burns on.'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1
  2004-12-03  0:08 ` Joe Buck
  2004-12-03 17:13   ` Albert Chin
  2004-12-07 15:56   ` Nix
@ 2004-12-09 20:46   ` Michael Matz
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Matz @ 2004-12-09 20:46 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc, Paolo Carlini

Hi,

On Thu, 2 Dec 2004, Joe Buck wrote:

> On Thu, Dec 02, 2004 at 04:33:02PM -0600, Albert Chin wrote:
> > Just build Qt-3.3.3 with GCC 3.4.2 and 3.4.3 on Redhat Linux 7.1/x86
> > and RHEL 2.1/x86. No problems with 3.4.2. However, when building with
> > 3.4.3, I get a segfault during the build:
> >   ...
> > Redhat Linux 9/x86, RHEL 3.0/x86, and RHEL 3.0/amd64 work fine. I
> > reviewed http://gcc.gnu.org/gcc-3.4/changes.html#3.4.3 but nothing
> > stands out as to what causes this. Where should I start looking?
> 
> Are you saying that you get a segfault when you build with 3.4.3 on RHEL
> 2.1, but not when you build with 3.4.3 on RHEL 3.0 or RH9?  If so, this
> doesn't sound like the compiler is at fault.  A KDE developers' list might
> be a better place to track this one down, but I don't see any alternative
> to just debugging the problem.  If the blowup is in a place where there
> appears to be no code, it's probably in a destructor.

It might be similar to problems we faced when building KDE with HEAD.  
The problem there was the mt allocator which accessed static objects in
it's dtors, which already were deleted (the order of dtor running is not
specified).  This results in erratic behaviour, and it's possible that it
doesn't lead to segfaults in some circumstances.  You should be able to
investigate this with valgrind.  The difference with the different version
might have to do with different default configurations chosen by GCC
depending on the system it's build on.  And of course, it still is
possibly a KDE bug, so after valgrinding it report it there too.


Ciao,
Michael.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-09 20:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-02 22:33 SEGV building qt-3.3.3 with GCC 3.4.3 on RH 7.1/RHEL 2.1 Albert Chin
2004-12-03  0:08 ` Joe Buck
2004-12-03 17:13   ` Albert Chin
2004-12-07 15:56   ` Nix
2004-12-09 20:46   ` Michael Matz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).