[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#710307: valgrind: illegal instruction on mipsel



[ CCing debian-mips ]

On Wed, May 29, 2013 at 05:18:52PM -0400, Daniel Kahn Gillmor wrote:
> On 05/29/2013 05:01 PM, Alessandro Ghedini wrote:
> > Can you provide a backtrace?
> 
> I'm not sure how to do that, and i'm doubly-confused given the weird
> interactions between valgrind and gdb.
> 
> just trying:
> 
>  gdb valgrind
> 
> gives me:
> 
> "/usr/bin/valgrind": not in executable format: File format not recognized
> 
> can you point me to docs for getting such a backtrace?

Ah yes, /usr/bin/valgrind is a shell script. The actual binary is
/usr/bin/valgrind.bin.

Anyway here's the backtrace:

> Starting program: /usr/bin/valgrind.bin ls
> process 23291 is executing new program: /usr/lib/valgrind/memcheck-mips32-linux
> 
> Program received signal SIGILL, Illegal instruction.
> preen_nsegments () at m_aspacemgr/aspacemgr-linux.c:818
> 818	m_aspacemgr/aspacemgr-linux.c: No such file or directory.
> (gdb) bt
> #0  preen_nsegments () at m_aspacemgr/aspacemgr-linux.c:818
> #1  0x380828f8 in add_segment (seg=<optimized out>) at m_aspacemgr/aspacemgr-linux.c:1494
> #2  0x38083b84 in vgPlain_am_startup (sp_at_startup=<optimized out>) at m_aspacemgr/aspacemgr-linux.c:1699
> #3  0x380645ac in valgrind_main (argc=2, argv=0x7fff3ca4, envp=0x7fff3cb0) at m_main.c:1671
> #4  0x380699a4 in _start_in_C_linux (pArgc=0x7fff3ca0) at m_main.c:2994
> #5  0x3806392c in __start ()

And here is the relevant assembly:

> (gdb) disas
>    [...]
>    0x380801c4 <+508>:	move	at,at
> => 0x380801c8 <+512>:	beq	v0,t0,0x380801e4 <preen_nsegments+540>
>    0x380801cc <+516>:	mul	a2,v0,t3
>    0x380801d0 <+520>:	addu	v0,a2,t2
>    0x380801d4 <+524>:	lbu	a2,0(v0)
>    0x380801d8 <+528>:	beqz	a2,0x380803b8 <preen_nsegments+1008>
>    0x380801dc <+532>:	li	a2,819
>    0x380801e0 <+536>:	sb	t1,1(v0)
>    0x380801e4 <+540>:	addiu	a0,a0,1

I'm not much into MIPS, but there doesn't seem to be anything weird there. Could
someone from debian-mips shed some light on this?

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'

Attachment: signature.asc
Description: Digital signature


Reply to: