|
From: Adam S. <ad...@sp...> - 2006-07-18 23:27:50
Attachments:
dlt.sh
|
Hi, I'm currently writing a program that uses dlopen() to play with shared libs, and valgrind is giving me some errors, the first of which is an "Invalid read of size 4" error. I'm pretty sure I'm not doing anything wrong in my code. I've checked as much as I can that I'm building both the library and the code that accesses it properly. I've checked the BTS and couldn't find any mention of this problem there[0]. I've also checked the list archives[1], and the best results (numbers 1 and 4 in the search I got) were unanswered[2] and what looks like user error[3] (I'm not getting SEGV). Attached is a minimal testcase that exhibits the error. It's a shell script that writes two tiny (< 10 line) c files, compiles them and runs the result. Note that the program appears to run fine and returns the correct value. I'm running "valgrind-3.2.0-Debian" on an up-to-date Debian testing system. (libc6 2.3.6-15, kernel 2.6.15-8, more system info is available on request.) Any help, including independent confirmation, fixes to gcc invocation, fixes to code, pointers to other lists/btss, gratefully received. Cheers, Adam Spragg [0]http://bugs.kde.org/buglist.cgi?short_desc_type=allwordssubstr&short_desc=dlopen&long_desc_type=allwordssubstr&long_desc=&product=valgrind&bugidtype=include&bug_id=&votes=&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&order=Bug+Number&cmdtype=doit [1]http://search.gmane.org/?query=dlopen&email=&group=gmane.comp.debugging.valgrind&sort=relevance&DEFAULTOP=and&query= [2]http://sourceforge.net/mailarchive/forum.php?thread_id=9839524&forum_id=32038 [3]http://sourceforge.net/mailarchive/forum.php?thread_id=7944833&forum_id=32038 -- To describe religions as mind viruses is sometimes interpreted as contemptuous or even hostile. It is both. -- Richard Dawkins - "A Devil's Chaplain" |
|
From: Ivan S. <isj...@i1...> - 2006-07-19 16:15:36
|
On Wednesday 19 July 2006 01:27, Adam Spragg wrote: > Hi, > > I'm currently writing a program that uses dlopen() to play with shared > libs, and valgrind is giving me some errors, the first of which is an > "Invalid read of size 4" error. ... > Any help, including independent confirmation, I am unable to recreate the problem under x86-64 in Valgrind 3.1.0, 3.1.1 and 3.2.0 on SuSE 10.1 (kernel 2.6.16.13, glibc-devel-2.4-13.1), so the problem is probably architecture-specific or OS-flavour-specific. I hope this helps other to track down the problem. Regards, Ivan |