LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2010, 08:21 AM   #1
hs_linux
LQ Newbie
 
Registered: Dec 2009
Posts: 14

Rep: Reputation: 0
Valgrind output showing addresses not code against errors


I am running Valgrind on my program. It shows me two errors but mentions only addresses against them and not actual code even on a debug build.

Could you pls. help me understand what it says and how to reach the erroneous line of code?

The output is
==23002== Memcheck, a memory error detector.
==23002== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==23002== Using LibVEX rev 1575, a library for dynamic binary translation.
==23002== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==23002== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==23002== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==23002== For more details, rerun with: -v
==23002==
==23002== Invalid read of size 4
==23002== at 0x8AAE6D: open_path (in /lib/ld-2.3.4.so)
==23002== by 0x8AB68B: _dl_map_object (in /lib/ld-2.3.4.so)
==23002== by 0x8AF307: openaux (in /lib/ld-2.3.4.so)
==23002== by 0x8B066D: _dl_catch_error (in /lib/ld-2.3.4.so)
==23002== by 0x8AF5A9: _dl_map_object_deps (in /lib/ld-2.3.4.so)
==23002== by 0x8A6459: dl_main (in /lib/ld-2.3.4.so)
==23002== by 0x8B3DF4: _dl_sysdep_start (in /lib/ld-2.3.4.so)
==23002== by 0x8A53EF: _dl_start (in /lib/ld-2.3.4.so)
==23002== by 0x8A47C6: (within /lib/ld-2.3.4.so)
==23002== Address 0x2F8BBBF8 is not stack'd, malloc'd or (recently) free'd
==23002==
==23002== Process terminating with default action of signal 11 (SIGSEGV)
==23002== Access not within mapped region at address 0x2F8BBBF8
==23002== at 0x8AAE6D: open_path (in /lib/ld-2.3.4.so)
==23002== by 0x8AB68B: _dl_map_object (in /lib/ld-2.3.4.so)
==23002== by 0x8AF307: openaux (in /lib/ld-2.3.4.so)
==23002== by 0x8B066D: _dl_catch_error (in /lib/ld-2.3.4.so)
==23002== by 0x8AF5A9: _dl_map_object_deps (in /lib/ld-2.3.4.so)
==23002== by 0x8A6459: dl_main (in /lib/ld-2.3.4.so)
==23002== by 0x8B3DF4: _dl_sysdep_start (in /lib/ld-2.3.4.so)
==23002== by 0x8A53EF: _dl_start (in /lib/ld-2.3.4.so)
==23002== by 0x8A47C6: (within /lib/ld-2.3.4.so)
==23002==
==23002== Jump to the invalid address stated on the next line
==23002== at 0x246: ???
==23002== Address 0x246 is not stack'd, malloc'd or (recently) free'd
==23002==
==23002== Process terminating with default action of signal 11 (SIGSEGV)
==23002== Bad permissions for mapped region at address 0x246
==23002== at 0x246: ???
==23002==
==23002== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==23002== malloc/free: in use at exit: 0 bytes in 0 blocks.
==23002== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==23002== For counts of detected errors, rerun with: -v
==23002== All heap blocks were freed -- no leaks are possible.

Last edited by hs_linux; 02-26-2010 at 08:39 AM.
 
Old 02-26-2010, 12:01 PM   #2
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
The errors are noticed in /lib/ld-2.3.4.so -- maybe that is NOT built for debugging?
Valgrind is not only showing addresses, but function names (within ld); the "dl" parts hint at "dynamic load". Something along run-time linkig may be going wrong.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Local machines showing up with external addresses?? Jim Miller Linux - Software 1 11-09-2009 01:13 AM
unknown IP addresses showing up in nmap Gortex Linux - Security 19 02-27-2009 08:29 AM
how to understand valgrind output? santoshturamari Linux - Newbie 0 11-04-2008 04:57 AM
conky not showing all output wilsid Linux - Software 0 06-05-2008 03:54 PM
valgrind only output leaks? c0uchm0nster Linux - Software 0 10-22-2007 06:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration