Bug 362934 - [AsusWRT] Arm v7 illegal instruction
Summary: [AsusWRT] Arm v7 illegal instruction
Status: RESOLVED INTENTIONAL
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.11.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-11 11:04 UTC by Sergey
Modified: 2018-04-24 09:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2016-05-11 11:04:06 UTC
I integrated valgrind 3.11.0 into AsusWRT-Merlin 380.58. I tried to use it on RT-AC87U and RT-AC5300 routers (they are using different toolchains).

When I try to check arbitrary program with Valgrind, it prints:

admin@RT-AC5300-0810:/tmp/home/root# valgrind qharvestd -F -c/tmp/qharvestd.conf
==1063== Memcheck, a memory error detector
==1063== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==1063== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==1063== Command: qharvestd -F -c/tmp/qharvestd.conf
==1063== 
==1063== 
==1063== Process terminating with default action of signal 4 (SIGILL)
==1063==  Illegal opcode at address 0x3807472C
==1063==    at 0x4000930: _start (in /lib/ld-uClibc.so.0)
==1063== 
==1063== HEAP SUMMARY:
==1063==     in use at exit: 0 bytes in 0 blocks
==1063==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==1063== 
==1063== All heap blocks were freed -- no leaks are possible
==1063== 
==1063== For counts of detected and suppressed errors, rerun with: -v
==1063== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Illegal instruction

Almost the same with cachegrind:
admin@RT-AC5300-0810:/tmp/home/root# valgrind  --tool=cachegrind qharvestd -F -c/tmp/qharvestd.conf
==1061== Cachegrind, a cache and branch-prediction profiler
==1061== Copyright (C) 2002-2015, and GNU GPL'd, by Nicholas Nethercote et al.
==1061== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==1061== Command: qharvestd -F -c/tmp/qharvestd.conf
==1061== 
--1061-- Warning: Cannot auto-detect cache config, using defaults.
--1061--          Run with -v to see.
==1061== 
==1061== Process terminating with default action of signal 4 (SIGILL)
==1061==  Illegal opcode at address 0x38047DF8
==1061==    at 0x4000930: _start (in /lib/ld-uClibc.so.0)
==1061== 
==1061== I   refs:      0
==1061== I1  misses:    0
==1061== LLi misses:    0
==1061== I1  miss rate: 0.00%
==1061== LLi miss rate: 0.00%
==1061== 
==1061== D   refs:      0  (0 rd   + 0 wr)
==1061== D1  misses:    0  (0 rd   + 0 wr)
==1061== LLd misses:    0  (0 rd   + 0 wr)
==1061== D1  miss rate: 0.0% (0.0%     + 0.0%  )
==1061== LLd miss rate: 0.0% (0.0%     + 0.0%  )
==1061== 
==1061== LL refs:       0  (0 rd   + 0 wr)
==1061== LL misses:     0  (0 rd   + 0 wr)
==1061== LL miss rate:  0.0% (0.0%     + 0.0%  )
Illegal instruction

admin@RT-AC5300-0810:/tmp/home/root# cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 2798.38

processor       : 1
BogoMIPS        : 2798.38

Features        : swp half thumb fastmult edsp 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : Northstar Prototype
Revision        : 0000
Serial          : 0000000000000000


The only change I introduced in the source code is in configure script: armv7*) -> arm*). Without this change configure fails.
Comment 1 Julian Seward 2016-09-16 14:00:02 UTC
What CPU/SOC is this?  Do you know if it is NEON capable?
Comment 2 Sergey 2016-09-16 15:51:19 UTC
I could only point you to this info:
https://wikidevi.com/wiki/ASUS_RT-AC87U   => the SOC is BCM4709A0
https://wikidevi.com/wiki/Broadcom
Comment 3 Peter Maydell 2016-09-16 16:00:57 UTC
"Features : swp half thumb fastmult edsp" in the /proc/cpuinfo means no Neon, and not even any VFP -- integer only core.
Comment 4 Julian Seward 2017-05-08 13:24:40 UTC
I don't think V will work on an integer-only CPU.  So, closing
as WONTFIX.
Comment 5 jamal.moustaid93 2018-04-24 09:48:54 UTC
did you resolve the problem ??