bug-gplusplus
[Top][All Lists]
Advanced

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

strange SIGSEGV error in stl basic_string


From: Gad Hayisraeli
Subject: strange SIGSEGV error in stl basic_string
Date: Mon, 26 Mar 2001 10:30:36 +0200

platform: Solaris UltraSPARC-IIi
os: SunOS 5.7
compiler: gcc 2.9.5.2, release 19991024
linker (binutils): 2.10.1 (gnu)
debugger: gdb 4.18, xxgdb 1.12

the bug/problem:
-----------------
i have a complexed c++ software, in which i initialize objects from one
another.
here's the constructors' process:

VNic constructor -> calling Nic's constructor -> calling NicBase ...- >
Calling NipObj...
the code is compiled and run fine under windows NT. compiled fine on Solaris
and linked fine also.
on run , i get segmentation fault:
----------------------------------------------------------
"Program received signal SIGSEGV, Segmentation fault.
0xff257170 in basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::Rep::grab ()
---------------------------------------------------------
i traced the code in xxgdb and in the first line of the Nic constructor i
got this fault. (this line contains : nic::nic() only !)
after adding some cout to all constructors , i saw only NiPObj printed and
after that i recived the seg. fault.

note: i dont use threads at all (i say this because i saw some comments on
the rep::grab function wich is reference counting function and not secured
enough in multi-threaded mode)

note: when initializing straight from the nic, without using VNic, it works
fine, but i see no cout, even not in Nicobj, while in the Vnic example i saw
just the nicobj cout ... strange ...

Regards,

Gad Hayisraeli
VNMS Unix Core Developer
VManage Ltd.
e-mail: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]