LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2010, 11:39 PM   #1
thelink123
Member
 
Registered: Aug 2008
Location: India, Kerala
Distribution: openSUSE 11
Posts: 46

Rep: Reputation: 15
Thumbs up Valgrind Issue : illegal opcode memcpy in /lib/ld-2.8.so


Hi LQ,

I am running Valgrind on PowerPC target machine. I get the following error

Code:
==2848== Memcheck, a memory error detector.
==2848== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==2848== Using LibVEX rev 1884, a library for dynamic binary translation.
==2848== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==2848== Using valgrind-3.4.1, a dynamic binary instrumentation framework.
==2848== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==2848== For more details, rerun with: -v
==2848==
disInstr(ppc): unhandled instruction: 0x10E40301
                 primary 4(0x4), secondary 769(0x301)
==2848== valgrind: Unrecognised instruction at address 0x4019510.
==2848== Your program just tried to execute an instruction that Valgrind
==2848== did not recognise.  There are two possible reasons for this.
==2848== 1. Your program has a bug and erroneously jumped to a non-code
==2848==    location.  If you are running Memcheck and you just saw a
==2848==    warning about a bad jump, it's probably your program's fault.
==2848== 2. The instruction is legitimate but Valgrind doesn't handle it,
==2848==    i.e. it's Valgrind's fault.  If you think this is the case or
==2848==    you are not sure, please let us know and we'll try to fix it.
==2848== Either way, Valgrind will now raise a SIGILL signal which will
==2848== probably kill your program.
==2848==
==2848== Process terminating with default action of signal 4 (SIGILL): dumping core
==2848==  Illegal opcode at address 0x4019510
==2848==    at 0x4019510: memcpy (in /lib/ld-2.8.so)
==2848==    by 0x40021BF: _dl_start_final (in /lib/ld-2.8.so)
==2848==    by 0x40162C7: _start (in /lib/ld-2.8.so)
==2848==
==2848== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
==2848== malloc/free: in use at exit: 0 bytes in 0 blocks.
==2848== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==2848== For counts of detected errors, rerun with: -v
==2848== All heap blocks were freed -- no leaks are possible.
Illegal instruction
What should i do to solve this issue.

Please note the executable 'temp' used in this case is a simple c program executable.

Thanks,
thelink

Adding the output obtained when using the -v verbose option for valgrind
[CODE]
root@localhost:/$ valgrind -v --tool=memcheck ~/temp -v
==2850== Memcheck, a memory error detector.
==2850== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==2850== Using LibVEX rev 1884, a library for dynamic binary translation.
==2850== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==2850== Using valgrind-3.4.1, a dynamic binary instrumentation framework.
==2850== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==2850==
--2850-- Command line
--2850-- /root/temp
--2850-- -v
--2850-- Startup, with flags:
--2850-- -v
--2850-- --tool=memcheck
--2850-- Contents of /proc/version:
--2850-- Linux version 2.6.27.39-29_WR3.0 (gcc version 4.3.2) #1 SMP PREEMPT Mon Aug 9 16:16:40 EDT 2010
--2850-- Arch and hwcaps: PPC32, ppc32-int-flt-FX-GX
--2850-- Page sizes: currently 4096, max supported 65536
--2850-- Valgrind library directory: /home/ornas02/ncherian/MyBin/Valgrind/lib/valgrind
--2850-- Reading syms from /lib/ld-2.8.so (0x4000000)
--2850-- Reading debug info from /usr/lib/debug/lib/ld-2.8.so.debug ..
--2850-- Reading syms from /root/temp (0x10000000)
--2850-- Reading syms from /home/ornas02/ncherian/MyBin/Valgrind/lib/valgrind/ppc32-linux/memcheck (0x38000000)
--2850-- object doesn't have a dynamic symbol table
--2850-- Reading suppressions file: /home/ornas02/ncherian/MyBin/Valgrind/lib/valgrind/default.supp
disInstr(ppc): unhandled instruction: 0x10E40301
primary 4(0x4), secondary 769(0x301)
==2850== valgrind: Unrecognised instruction at address 0x4019510.
==2850== Your program just tried to execute an instruction that Valgrind
==2850== did not recognise. There are two possible reasons for this.
==2850== 1. Your program has a bug and erroneously jumped to a non-code
==2850== location. If you are running Memcheck and you just saw a
==2850== warning about a bad jump, it's probably your program's fault.
==2850== 2. The instruction is legitimate but Valgrind doesn't handle it,
==2850== i.e. it's Valgrind's fault. If you think this is the case or
==2850== you are not sure, please let us know and we'll try to fix it.
==2850== Either way, Valgrind will now raise a SIGILL signal which will
==2850== probably kill your program.
==2850==
==2850== Process terminating with default action of signal 4 (SIGILL): dumping core
==2850== Illegal opcode at address 0x4019510
==2850== at 0x4019510: memcpy (in /lib/ld-2.8.so)
==2850== by 0x40021BF: _dl_start_final (in /lib/ld-2.8.so)
==2850== by 0x40162C7: _start (in /lib/ld-2.8.so)
==2850==
==2850== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
--2850--
--2850-- supp: 4 dl-hack3-cond-0
==2850== malloc/free: in use at exit: 0 bytes in 0 blocks.
==2850== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==2850==
==2850== All heap blocks were freed -- no leaks are possible.
--2850-- memcheck: sanity checks: 0 cheap, 1 expensive
--2850-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--2850-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
--2850-- memcheck: auxmaps_L2: 0 searches, 0 nodes
--2850-- memcheck: SMs: n_issued = 6 (96k, 0M)
--2850-- memcheck: SMs: n_deissued = 0 (0k, 0M)
--2850-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M)
--2850-- memcheck: SMs: max_undefined = 0 (0k, 0M)
--2850-- memcheck: SMs: max_defined = 1 (16k, 0M)
--2850-- memcheck: SMs: max_non_DSM = 6 (96k, 0M)
--2850-- memcheck: max sec V bit nodes: 1 (0k, 0M)
--2850-- memcheck: set_sec_vbits8 calls: 1 (new: 1, updates: 0)
--2850-- memcheck: max shadow mem size: 400k, 0M
--2850-- translate: fast SP updates identified: 2 ( 66.6%)
--2850-- translate: generic_known SP updates identified: 1 ( 33.3%)
--2850-- translate: generic_unknown SP updates identified: 0 ( 0.0%)
--2850-- tt/tc: 114 tt lookups requiring 113 probes
--2850-- tt/tc: 114 fast-cache updates, 2 flushes
--2850-- transtab: new 57 (1,468 -> 20,956; ratio 142:10) [0 scs]
--2850-- transtab: dumped 0 (0 -> ??)
--2850-- transtab: discarded 0 (0 -> ??)
--2850-- scheduler: 423 jumps (bb entries).
--2850-- scheduler: 0/58 major/minor sched events.
--2850-- sanity: 1 cheap, 1 expensive checks.
--2850-- exectx: 769 lists, 5 contexts (avg 0 per list)
--2850-- exectx: 7 searches, 2 full compares (285 per 1000)
--2850-- exectx: 0 cmp2, 5 cmp4, 0 cmpAll
--2850-- errormgr: 2 supplist searches, 26 comparisons during search
--2850-- errormgr: 4 errlist searches, 5 comparisons during search
Illegal instruction
[CODE]

Last edited by thelink123; 10-24-2010 at 11:53 PM.
 
Old 10-26-2010, 01:45 AM   #2
thelink123
Member
 
Registered: Aug 2008
Location: India, Kerala
Distribution: openSUSE 11
Posts: 46

Original Poster
Rep: Reputation: 15
Thumbs up

no one in LQ is able to help me!!!!!!!!!!!!!!!!!!!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Valgrind / loader / $ORIGIN issue jim2718 Linux - Software 1 12-17-2010 05:15 PM
#0 0xb7873b71 in memcpy () from /lib/tls/i686/cmov/libc.so.6 Efo Programming 2 01-26-2009 06:18 PM
transcode error in DVD::RIP lib issue? Sliceman Fedora 4 04-20-2007 05:00 PM
Lib issue... sockmonkey Linux - Software 2 04-15-2006 09:36 AM
how to conver binary to opcode ? ssg14j Linux - General 1 07-29-2005 02:42 PM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration