|
From: Matze B. <ma...@br...> - 2003-10-01 12:51:10
|
Hi,
valgrind seems to generate wrong warnings if it is used with c++
applications that throw exceptions. Here's a simple example:
#include <iostream>
int main()
{
try {
throw "Exception";
} catch(...) {
std::cout << "gotcha!" << std::endl;
}
return 0;
}
This gives me the following (false) valgrind warning (2 times):
==16055== Invalid read of size 4
==16055== at 0x40317320: _Unwind_IteratePhdrCallback
(unwind-dw2-fde-glibc.c:133)
==16055== by 0x416027D5: __dl_iterate_phdr (in /lib/libc-2.3.2.so)
==16055== by 0x403176B4: _Unwind_Find_FDE (unwind-dw2-fde-glibc.c:283)
==16055== by 0x403151E4: uw_frame_state_for (unwind-dw2.c:932)
==16055== by 0x4031571F: uw_init_context_1 (unwind-dw2.c:1173)
==16055== by 0x403159A7: _Unwind_RaiseException (unwind.inc:84)
==16055== by 0x402E7A32: __cxa_throw (in
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libstdc++.so.5.0.5)
==16055== by 0x804897E: main (in /home/matze/a.out)
==16055== by 0x4150E936: __libc_start_main (in /lib/libc-2.3.2.so)
==16055== by 0x80488A0: (within /home/matze/a.out)
==16055== Address 0xFFFFE034 is not stack'd, malloc'd or free'd
This is my system configuration:
pentium4 system, running gentoo linux with
gcc version 3.3.1
glibc 2.3.2
XFree86 4.3 with nvidia driver
valgrind from 20030725
Greetings,
Matze
PS: Please include my e-mail address in the response, I'm not subscribed
to this mailing list.
|
|
From: Dirk M. <dm...@gm...> - 2003-10-01 13:58:22
|
On Wednesday 01 October 2003 14:51, Matze Braun wrote: > valgrind seems to generate wrong warnings if it is used with c++ > applications that throw exceptions. Here's a simple example: Works without warnings here. gcc 3.3.1 glibc 2.3.2. Dirk |