public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11462] New: Segmentation Fault during Code Loading
@ 2003-07-08 9:26 j dot w dot jones at swansea dot ac dot uk
2003-07-08 12:56 ` [Bug c++/11462] " pinskia at physics dot uc dot edu
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: j dot w dot jones at swansea dot ac dot uk @ 2003-07-08 9:26 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
Summary: Segmentation Fault during Code Loading
Product: gcc
Version: 2.95.3
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: j dot w dot jones at swansea dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
I am not sure whether this is a GCC bug or a Linux bug.
I have been developing some software over a number of years that has grown over
time.
I have just hit a problem where the executable produces a segmentation fault
before it even gets to a line of my code. The gdb trace of the core file is:
GNU gdb 5.1.1
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-suse-linux"...
Core was generated by `mesh_exe'.
Program terminated with signal 11, Segmentation fault.
#0 0x40009e53 in ?? ()
(gdb) where
#0 0x40009e53 in ?? ()
#1 0x40003e3a in ?? ()
#2 0x4000e5dd in ?? ()
#3 0x40002432 in ?? ()
#4 0x4000237c in ?? ()
In order to try to find the problem I returned my code to its previous working
state and slowly added the new bits in. It seems that just by adding an extra
shared library to the link line during compilation causes the code to crash even
though nothing in the library is referenced yet.
Is this a limit at to the number of shared libraries that can be linked?
The output of ldd for the executable is:
cgjulius:cvnforce1 112% ldd `which mesh_exe`
libmesh_server_s.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_server_s.so
(0x40017000)
libmesh_server_c.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_server_c.so
(0x40130000)
libgeneric_server_idl_s.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libgeneric_server_idl_s.so
(0x40271000)
libgeneric_server_idl_c.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libgeneric_server_idl_c.so
(0x40279000)
libmesh_spreader.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_spreader.so
(0x40284000)
libmesh_3d.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_3d.so
(0x40286000)
libglobal_element_map.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libglobal_element_map.so
(0x4035e000)
libmesh_2d.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_2d.so
(0x40368000)
libmesh_io_new.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_io_new.so
(0x40414000)
libmesh_io_new_exc.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_io_new_exc.so
(0x404a6000)
libmesh_checks.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_checks.so
(0x404b0000)
libmesh_analysis_criteria.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmesh_analysis_criteria.so
(0x404b8000)
libedge_set.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libedge_set.so
(0x404be000)
librender_object_s.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/librender_object_s.so
(0x404cc000)
librender_object_base.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/librender_object_base.so
(0x404fe000)
libtetrahedra_set.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libtetrahedra_set.so
(0x40505000)
libtriangle_set.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libtriangle_set.so
(0x40512000)
libnumbering_set.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libnumbering_set.so
(0x4052e000)
libcommunication_set.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libcommunication_set.so
(0x4053f000)
libtetrahedron.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libtetrahedron.so
(0x40550000)
libpyramid.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libpyramid.so
(0x4055c000)
libprism.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libprism.so
(0x40563000)
libhexahedron.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libhexahedron.so
(0x4056a000)
libremote_control.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libremote_control.so
(0x40572000)
libremote_daemon_factory_c.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libremote_daemon_factory_c.so
(0x4058c000)
libremote_daemon_c.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libremote_daemon_c.so
(0x405a5000)
libprocess_startup.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libprocess_startup.so
(0x405c2000)
libplatform_list.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libplatform_list.so
(0x405d2000)
libplatform.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libplatform.so
(0x405df000)
libvariable_info_s.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libvariable_info_s.so
(0x405e6000)
libvariable_info_c.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libvariable_info_c.so
(0x405f0000)
libobject_attr_server.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libobject_attr_server.so
(0x405ff000)
libobject_attr_manager.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libobject_attr_manager.so
(0x40620000)
libplane.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libplane.so
(0x4063b000)
libline.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libline.so
(0x4064d000)
libargument_parser.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libargument_parser.so
(0x40660000)
libvstring.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libvstring.so
(0x4066a000)
libmpi_communicator.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmpi_communicator.so
(0x40674000)
libbuf_communicator.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libbuf_communicator.so
(0x40680000)
libcommunicator.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libcommunicator.so
(0x4068d000)
libcritical.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libcritical.so
(0x40697000)
liblog_control.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/liblog_control.so
(0x4069d000)
liblicense.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/liblicense.so
(0x406b0000)
libmatrix_lib.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libmatrix_lib.so
(0x406b6000)
libvector_lib.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libvector_lib.so
(0x406bc000)
libtimer.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libtimer.so
(0x406c5000)
libarray_lib.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libarray_lib.so
(0x406cb000)
libglobal_const_c.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libglobal_const_c.so
(0x406d0000)
libdummy_opengl_lib.so =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/PSUE_II/libdummy_opengl_lib.so
(0x4073a000)
libOB.so.3.3.4 =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/Orbacus/lib/libOB.so.3.3.4
(0x4073c000)
libJTC.so.1.0.14 =>
/civeng/cvonyx01/cgjulius/PSUE_II_Trials2/Distribution/Libraries/Linux/Orbacus/lib/libJTC.so.1.0.14
(0x40a63000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40a9a000)
libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x40ab0000)
libm.so.6 => /lib/libm.so.6 (0x40afd000)
libc.so.6 => /lib/libc.so.6 (0x40b21000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Any help would be appreciated.
Regards,
Jason
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
@ 2003-07-08 12:56 ` pinskia at physics dot uc dot edu
2003-07-08 13:41 ` bangerth at dealii dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-08 12:56 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-08 12:56 -------
2.95.3 is a very old release of gcc, can you try with a new version like 3.3?
Also can you provide a simple example after reading <http://gcc.gnu.org/bugs.html>?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
2003-07-08 12:56 ` [Bug c++/11462] " pinskia at physics dot uc dot edu
@ 2003-07-08 13:41 ` bangerth at dealii dot org
2003-07-10 21:34 ` j dot w dot jones at swansea dot ac dot uk
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2003-07-08 13:41 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
------- Additional Comments From bangerth at dealii dot org 2003-07-08 13:41 -------
Besides Andrew's comments: when you load shared libraries, startup
code such as static variable constructors are run. Your program
might crash in one of these. In any case, I would advise to compile
the program and all shared library with debug information so that
you get a decent stack backtrace instead of just ???
W.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
2003-07-08 12:56 ` [Bug c++/11462] " pinskia at physics dot uc dot edu
2003-07-08 13:41 ` bangerth at dealii dot org
@ 2003-07-10 21:34 ` j dot w dot jones at swansea dot ac dot uk
2003-07-10 21:39 ` bangerth at dealii dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: j dot w dot jones at swansea dot ac dot uk @ 2003-07-10 21:34 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
------- Additional Comments From j dot w dot jones at swansea dot ac dot uk 2003-07-10 21:34 -------
Subject: Re: Segmentation Fault during Code Loading
All of the code is compiled with -g (and I think -gstabs).
As I said before, the strange thing is, the code will work until I add
another shared library to the link line even though I don't call any of
its functions and there are no static constructors in that library.
The reason I am trying with gcc 2.95.3 is that a number of our clients
have distributions like Redhat 7.3 installed and, as far as I know, gcc
3 produces code that will not link with the runtime libraries of the
older distributions. Please correct me if I am wrong.
My other problem with providing an example is that this problem only
happens when the code is large. I can provide the executable and the
shared libraries if that would be helpful but the source code is part of
our development tree and runs to 100,000+ lines of code..
Regards,
Jason
bangerth at dealii dot org wrote:
>PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
>
>
>
>------- Additional Comments From bangerth at dealii dot org 2003-07-08 13:41 -------
>Besides Andrew's comments: when you load shared libraries, startup
>code such as static variable constructors are run. Your program
>might crash in one of these. In any case, I would advise to compile
>the program and all shared library with debug information so that
>you get a decent stack backtrace instead of just ???
>
>W.
>
>
>
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>
>
>
--
Dr. Jason Jones
Technical Manager - Digital Technium
Tel: 01792 295869
Fax: 01792 295676
E-mail: j.w.jones@swansea.ac.uk
School of Engineering
University of Wales Swansea
Singleton Park
Swansea
SA2 8PP UK
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
` (2 preceding siblings ...)
2003-07-10 21:34 ` j dot w dot jones at swansea dot ac dot uk
@ 2003-07-10 21:39 ` bangerth at dealii dot org
2003-07-29 20:22 ` pinskia at physics dot uc dot edu
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2003-07-10 21:39 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
------- Additional Comments From bangerth at dealii dot org 2003-07-10 21:39 -------
Well, you may of course work with whatever compiler version you want, but we'd
need a) evidence that the problem still happens with newer versions, and b) a
testcase before we can even think about fixing a possible bug.
Besides, please think again about the debug thing. Initializers in shared
libraries are run independently of whether you use the lib or not. You
will see from the stack backtrace if your program crashes in one of these,
and this may give you a clue as to where to look for the real problem. An
arbitrary limit on the number of shared libraries seems very implausible
to me.
Wolfgang
PS: Yes, the assumption is right that you need to link executables generated
by any version of gcc against _corresponding_ versions of the runtime libs.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
` (3 preceding siblings ...)
2003-07-10 21:39 ` bangerth at dealii dot org
@ 2003-07-29 20:22 ` pinskia at physics dot uc dot edu
2003-08-20 21:54 ` pinskia at gcc dot gnu dot org
2003-09-28 21:29 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-29 20:22 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Priority|P1 |P2
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
` (4 preceding siblings ...)
2003-07-29 20:22 ` pinskia at physics dot uc dot edu
@ 2003-08-20 21:54 ` pinskia at gcc dot gnu dot org
2003-09-28 21:29 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-20 21:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-20 21:54 -------
Is this C++ code?
If it is make sure you put the right dependencies on the shared libraries otherwise you will get a
crash like the one you are getting.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11462] Segmentation Fault during Code Loading
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
` (5 preceding siblings ...)
2003-08-20 21:54 ` pinskia at gcc dot gnu dot org
@ 2003-09-28 21:29 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-28 21:29 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11462
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-28 21:22 -------
No way to reproduce this bug, the problem is most likely that having the right depencies
on the shared libraries.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-09-28 21:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-08 9:26 [Bug c++/11462] New: Segmentation Fault during Code Loading j dot w dot jones at swansea dot ac dot uk
2003-07-08 12:56 ` [Bug c++/11462] " pinskia at physics dot uc dot edu
2003-07-08 13:41 ` bangerth at dealii dot org
2003-07-10 21:34 ` j dot w dot jones at swansea dot ac dot uk
2003-07-10 21:39 ` bangerth at dealii dot org
2003-07-29 20:22 ` pinskia at physics dot uc dot edu
2003-08-20 21:54 ` pinskia at gcc dot gnu dot org
2003-09-28 21:29 ` pinskia at gcc dot gnu dot org
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).