cout core dump

I

Iam25boy

Hi all,

I am experiencing a really weird core dump issue on Solaris 8. The
program was compiled with g++ and it is a multi-threaded program.

Here is the stack:
#0 0x7fb40890 in memcpy ()
from /usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
(gdb) where
#0 0x7fb40890 in memcpy ()
from /usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
#1 0x7f913260 in _fwrite_unlocked () from /usr/lib/libc.so.1
#2 0x7f913098 in fwrite () from /usr/lib/libc.so.1
#3 0x7f9b7a58 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#4 0x7f9b788c in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#5 0x7f9b7728 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#6 0x7f9d74d0 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#7 0x7f9d23b0 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#8 0x559b4 in _ZN6Logger7logendlERSo (this=<incomplete type>,
os=@0x1522a0)
at ../common/logfile.cpp:145


In the logfile.cpp, it cores here:
cout << buffer;

that's it.. it seems no matter what i do, i get the same issue. Any
insights?

Thanks,
 
V

Victor Bazarov

Iam25boy said:
I am experiencing a really weird core dump issue on Solaris 8. The
program was compiled with g++ and it is a multi-threaded program.

If multi-threading is the issue, we can't help you. C++ does not
define threads.
Here is the stack:
[..irrelevant..]

In the logfile.cpp, it cores here:
cout << buffer;

that's it.. it seems no matter what i do, i get the same issue. Any
insights?

What's the value of 'buffer' here? How is it defined/declared? Read
the FAQ section 5, #5.8.

Try removing anything that shouldn't have any effect, piece by piece,
and see if anything changes. Sometimes you don't know what has effect
on what, and what kind of effect. Next, try the same thing in a non-
threaded version of your program. Next, run it under a debugger.

V
 
J

Jim Langston

Iam25boy said:
Hi all,

I am experiencing a really weird core dump issue on Solaris 8. The
program was compiled with g++ and it is a multi-threaded program.

Here is the stack:
#0 0x7fb40890 in memcpy ()
from /usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
(gdb) where
#0 0x7fb40890 in memcpy ()
from /usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
#1 0x7f913260 in _fwrite_unlocked () from /usr/lib/libc.so.1
#2 0x7f913098 in fwrite () from /usr/lib/libc.so.1
#3 0x7f9b7a58 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#4 0x7f9b788c in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#5 0x7f9b7728 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#6 0x7f9d74d0 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#7 0x7f9d23b0 in ?? () at ../../../../libstdc++-v3/libsupc++/vec.cc:51
from /usr/local/lib/libstdc++.so.5
#8 0x559b4 in _ZN6Logger7logendlERSo (this=<incomplete type>,
os=@0x1522a0)
at ../common/logfile.cpp:145


In the logfile.cpp, it cores here:
cout << buffer;

that's it.. it seems no matter what i do, i get the same issue. Any
insights?

I could take some guesses, but you'll need to look at the code. Not knowing
your error messages real well, it sounds to me like
cout << buffer;
is complaining that buffer is not a complete type. What is buffer? How is
buffer defined? Does it override <<? Look in the override for operator<<
for buffer. Maybe buffer doesn't have << overridden?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top