Bug 328423 - Unrecognised instructions: _fips_armv7_tick and _armv7_tick
Summary: Unrecognised instructions: _fips_armv7_tick and _armv7_tick
Status: RESOLVED DUPLICATE of bug 331178
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0
Platform: Android Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 15:37 UTC by Joe
Modified: 2014-05-15 00:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Indepth details of valgrind build and execution on target (4.03 KB, text/plain)
2013-12-04 15:37 UTC, Joe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe 2013-12-04 15:37:22 UTC
Created attachment 83929 [details]
Indepth details of valgrind build and execution on target

Immediatly get Unrecognised instruction errors, which result in reboot, upon startup of in-house developed app, running on TMS320DM816x under Android.
uname -a:
Linux Group-Series 2.6.37+ #1 PREEMPT Sun Dec 1 13:03:34 CST 2013 armv7l GNU/Linux

Valgrind version: valgrind-3.9.0

See attachment: valgrin3.9_on_ARM_error.txt for full details
Comment 1 Vasily 2013-12-05 09:30:16 UTC
In your description 'Unpacked: tar xf valgrind-3.7.0.tar.bz2" - 3.7 - is a misprint? Did you try compile from the latest trunk?
Comment 2 Joe 2013-12-05 12:34:38 UTC
My apologies; I failed to update the unpack statement. I actually untarred valgrind-3.9.0.tar.bz2 and after my ARM build of valgrind executing the following on target platform:
=> ./valgrind --version
valgrind-3.9.0

-----Original Message-----
From: bugzilla_noreply@kde.org [mailto:bugzilla_noreply@kde.org] On Behalf Of Vasily
Sent: Thursday, December 05, 2013 3:30 AM
To: Liccese, Joe
Subject: [valgrind] [Bug 328423] Unrecognised instructions: _fips_armv7_tick and _armv7_tick

https://bugs.kde.org/show_bug.cgi?id=328423

Vasily <vasily.golubev@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vasily.golubev@gmail.com

--- Comment #1 from Vasily <vasily.golubev@gmail.com> --- In your description 'Unpacked: tar xf valgrind-3.7.0.tar.bz2" - 3.7 - is a misprint? Did you try compile from the latest trunk?

--
You are receiving this mail because:
You reported the bug.
Comment 3 Joe 2014-01-22 17:17:24 UTC
Pulled latest using the following command:
        svn co svn://svn.valgrind.org/valgrind/trunk valgrind
and rebuilt for ARM as noted in initial submit. Still seeing the same errors. Is there anyway to simply force valgrind to ignore these two errors?
Comment 4 Julian Seward 2014-01-22 21:56:12 UTC
(In reply to comment #3)
> Is there anyway to simply force valgrind to ignore these two errors?

No.  You'll need to disassemble the object and find the offending
instruction, and report back here.  The armv7 support in the trunk is 
fairly complete so I'm a bit surprised it failed.
Comment 5 Joe 2014-01-23 14:05:05 UTC
So you need more than the following that is reported by Valgrind?
disInstr(arm): unhandled instruction: 0xEE190F1D
                 cond=14(0xE) 27:20=225(0xE1) 4:4=1 3:0=13(0xD)
Comment 6 Joe 2014-04-03 13:43:46 UTC
disassembled ARM instruction causing unhandled instruction error:
0006f888 <_fips_armv7_tick>:
   6f888:	ee190f1d 	mrc	15, 0, r0, cr9, cr13, {0}
   6f88c:	e12fff1e 	.word	0xe12fff1e

0008a708 <_armv7_tick>:
   8a708:	ee190f1d 	mrc	15, 0, r0, cr9, cr13, {0}
   8a70c:	e12fff1e 	.word	0xe12fff1e
Comment 7 Peter Maydell 2014-04-03 14:12:46 UTC
The first of those (0xEE190F1D) is an attempt to read the cycle counter: see also bug 331178 for another instance of that (also on Android; I guess Android exposes the counter to userspace, unlike stock Linux?)

0xe12fff1e is just the usual Thumb return insn "BX LR", which should be no problem for Valgrind.
Comment 8 Joe 2014-04-03 15:18:45 UTC
I included the entire disassembly for routines: _fips_armv7_tick and _armv7_tick and as you noted the 0xe12fff1e is not an issue. The 0xEE190F1D is the offending instruction. Bug 331178 notes the offending instruction is within libcrypto.so, which is the same library we're using here that is causing the error.

As I noted in my original attachment; Valgrind indicates that "Valgrind will now raise a SIGILL signal which will probably kill your program" and in fact it does terminate.

Is there any workaround for this?

-----Original Message-----
From: bugzilla_noreply@kde.org [mailto:bugzilla_noreply@kde.org] On Behalf Of Peter Maydell
Sent: Thursday, April 03, 2014 9:13 AM
To: Liccese, Joe
Subject: [valgrind] [Bug 328423] Unrecognised instructions: _fips_armv7_tick and _armv7_tick

https://bugs.kde.org/show_bug.cgi?id=328423

Peter Maydell <peter.maydell@linaro.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.maydell@linaro.org

--- Comment #7 from Peter Maydell <peter.maydell@linaro.org> --- The first of those (0xEE190F1D) is an attempt to read the cycle counter: see also bug 331178 for another instance of that (also on Android; I guess Android exposes the counter to userspace, unlike stock Linux?)

0xe12fff1e is just the usual Thumb return insn "BX LR", which should be no problem for Valgrind.

--
You are receiving this mail because:
You reported the bug.
Comment 9 Joe 2014-04-05 15:56:04 UTC
I included the entire disassembly for routines: _fips_armv7_tick and _armv7_tick and as you noted the 0xe12fff1e is not an issue. The 0xEE190F1D is the offending instruction. Bug 331178 notes the offending instruction is within libcrypto.so, which is the same library we're using here that is causing the error.

As I noted in my original attachment; Valgrind indicates that "Valgrind will now raise a SIGILL signal which will probably kill your program" and in fact it does terminate.

Is there any workaround for this?
Comment 10 Julian Seward 2014-05-15 00:17:58 UTC
Closing this as a dup of 331178; that bug has a somewhat better
analysis/discussion.

*** This bug has been marked as a duplicate of bug 331178 ***