This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SIGSEGV when call libc which uses _malloc_unlocked on Solaris 8


Hi all,

spmetimes when I call libc library e.g. malloc or pthread_mutexattr_init
I receive SIGSEGV and back trace is very similar in all cases -like
this:
(gdb) bt
#0  0xff14116c in realloc () from /usr/lib/libc.so.1
#1  0xff140eb0 in _malloc_unlocked () from /usr/lib/libc.so.1
#2  0xff140f3c in _malloc_unlocked () from /usr/lib/libc.so.1
#3  0xff0d4334 in pthread_mutexattr_destroy () from
/usr/lib/libthread.so.1
#4  0xff0d4490 in pthread_mutexattr_setprotocol () from
/usr/lib/libthread.so.1
#5  0x182480 in gn_lock_tbl_init (no_of_locks=12) at source/lock.c:60
#6  0x182a0c in gn_unlock (lock=0) at source/lock.c:225
#7  0x1202bc in disk_class::find_name (this=0xffbed4d0,
name=@0xffbed4c8, force=0, status=0xffbee508)
    at source/disk.cxx:1782
#8  0x13f9fc in dir_class::get_root (this=0x7792f8, root_dev=0xffbed5e1
"001-DePfa-00000000A", status=0xffbee508)
    at source/dir.cxx:108
#9  0x135478 in pathname_class::resolve_path (this=0x775f60,
dobj=@0x7792f8, status=0xffbee508) at source/pathname.cxx:124
#10 0x13bb14 in pathname_class::fullpath (this=0x775f60,
pathname=0xffbedf38, direct=DOWN, st=0xffbedf18, status=0xffbee508)
    at source/pathname.cxx:913
#11 0x10a938 in odf_dir_read (session_id=2163414256, dir_h=7823200,
dir_direction=DIR_DOWN, dir_entry=0xffbee4e8,
    full_path=0xffbee0e8 "~ţţ˙\201\001\001", status=0xffbee508) at
source/odf.cxx:365
#12 0x1035a4 in odfl_impl::odf_dir_read (this=0x502788,
session_id=2163414256, dir_h=7823200, dir_direction=ODIN_DIR_DOWN,
    dir_entry=@0xffbee6b0, full_path=@0xffbee6a8, status=@0xffbee6a0) at
source/impl/odfl_impl.cxx:618
#13 0xfa18c in ODIN_odfl_skel::_OB_op_odf_dir_read (this=0x502788,
_ob_buf=@0xffbee9e8, _ob_sw=false, _ob_offIn=68,
    _ob_offOut=24) at source/gen/odfl_skel.cxx:780
#14 0xfee10 in ODIN_odfl_skel::_OB_dispatch (this=0x502788,
_ob_op=0x778ed0 "odf_dir_read", _ob_buf=@0xffbee9e8,
    _ob_sw=false, _ob_offIn=68, _ob_offOut=24) at
source/gen/odfl_skel.cxx:1980
#15 0x2b58ec in CORBA_BOA::_OB_dispatch () at
source/odin_base_conv.cxx:34
#16 0x2fb588 in OBGIOPServerWorker::dispatchRequest () at
source/odin_base_conv.cxx:34
#17 0x2fac08 in OBGIOPServerWorker::execute () at
source/odin_base_conv.cxx:34
#18 0x2fde2c in OBGIOPServerWorkerReactive::handleEvent () at
source/odin_base_conv.cxx:34
#19 0x2c6284 in OBSelectReactor::evalFdSets () at
source/odin_base_conv.cxx:34
#20 0x2c6718 in OBSelectReactor::dispatch () at
source/odin_base_conv.cxx:34
#21 0x2a9d50 in CORBA_BOA::impl_is_ready () at
source/odin_base_conv.cxx:34
#22 0x114c58 in register_obj (now=1007054188, server_name=0xffbefb39
"L1", name=0x4ea838 "", port=0x4ea89c,
    status=0xffbef858) at source/odf_srv_lib.cxx:205
#23 0x115a98 in odf_srv_init (number_of_threads=1,
server_name=0xffbefb39 "L1", status=0xffbef858)
    at source/odf_srv_lib.cxx:329
#24 0xde874 in main (argc=7, argv=0xffbef9dc) at
source/od_server.cxx:183
(gdb)

I found recommendation from Alexandre Oliva from RedHat to use
-D_REENTRANT and -D_PTHREAD to solve it, but it not works.
I use gcc version 2.95.2 19991024 (release) from www.sunfreeware.com and
my system is:
SunOS berta 5.8 Generic sun4u sparc SUNW,Ultra-5_10

I found one patch for Sun C++ 5.0 compiler which solve bug No. 4380729:
"C++ 5.0 generates SEGV signal in _malloc_unlocked in multithreaded
program"

I think that GCC should be fixed too. Can somebody tells me more about
this problem?

Thatks, Libor Chocholaty



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]