|
From: Brian A. <bri...@gm...> - 2006-01-04 00:51:31
|
Greetings. I am attempting to use valgrind on an application I am writing. Its written in C, but uses the botan library (http://botan.randombit.net/), and as a dependancy, the gmp library (http://www.swox.com/gmp). The program runs "ok" when its not under valgrind. But, I get the following when its under valgrind: $ valgrind --leak-check=yes ./a.out --help ==28586== Memcheck, a memory error detector. ==28586== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==28586== Using LibVEX rev 1367, a library for dynamic binary translation. ==28586== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==28586== Using valgrind-3.0.1, a dynamic binary instrumentation framework. ==28586== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==28586== For more details, rerun with: -v ==28586== ./a.out: error while loading shared libraries: libgmp.so.3: cannot enable executable stack as shared object requires: Invalid argument ==28586== Jump to the invalid address stated on the next line ==28586== at 0x4FA: ??? ==28586== by 0x1B8EF5EB: _dl_signal_error (in /lib/ld-2.3.5.so) ==28586== by 0x1B8EED11: _dl_map_object_deps (in /lib/ld-2.3.5.so) ==28586== by 0x1B8E63DE: dl_main (in /lib/ld-2.3.5.so) ==28586== by 0x1B8F2AE5: _dl_sysdep_start (in /lib/ld-2.3.5.so) ==28586== by 0x1B8E54CD: _dl_start (in /lib/ld-2.3.5.so) ==28586== by 0x1B8E47D6: (within /lib/ld-2.3.5.so) ==28586== Address 0x4FA is not stack'd, malloc'd or (recently) free'd ==28586== ==28586== Process terminating with default action of signal 11 (SIGSEGV) ==28586== Access not within mapped region at address 0x4FA ==28586== at 0x4FA: ??? ==28586== by 0x1B8EF5EB: _dl_signal_error (in /lib/ld-2.3.5.so) ==28586== by 0x1B8EED11: _dl_map_object_deps (in /lib/ld-2.3.5.so) ==28586== by 0x1B8E63DE: dl_main (in /lib/ld-2.3.5.so) ==28586== by 0x1B8F2AE5: _dl_sysdep_start (in /lib/ld-2.3.5.so) ==28586== by 0x1B8E54CD: _dl_start (in /lib/ld-2.3.5.so) ==28586== by 0x1B8E47D6: (within /lib/ld-2.3.5.so) ==28586== ==28586== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 1) ==28586== malloc/free: in use at exit: 0 bytes in 0 blocks. ==28586== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==28586== For counts of detected errors, rerun with: -v ==28586== No malloc'd blocks -- no leaks are possible. Ive searched the valgrind-users mailing lists, and have an active post about the same topic over in the Gentoo Programming forums. I tried recompiling gmp with -z noexecstack as suggested by one thread, but it didnt fix the problem. Any ideas? Thanks! ~Brian |
|
From: Julian S. <js...@ac...> - 2006-01-04 01:00:37
|
> didnt fix the problem. Any ideas? First off, try with 3.1.0. That has majorly overhauled memory management compared to 3.0.1 (basically you're reporting a bug against an old version). J |
|
From: Brian A. <bri...@gm...> - 2006-01-04 01:12:15
|
Wow. I didnt think to check that. But, the update seems to have fixed the problem. Thanks a bunch! ~Brian Julian Seward Wrote: >>didnt fix the problem. Any ideas? >> >> > >First off, try with 3.1.0. That has majorly overhauled memory management >compared to 3.0.1 (basically you're reporting a bug against an old version). > >J > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >_______________________________________________ >Valgrind-users mailing list >Val...@li... >https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > |