Bug 384261 - Assert failure on helgrind with the SIDT instruction
Summary: Assert failure on helgrind with the SIDT instruction
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: helgrind (other bugs)
Version First Reported In: 3.13.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-01 13:22 UTC by Andrea Mazzoleni
Modified: 2017-09-01 13:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Mazzoleni 2017-09-01 13:22:21 UTC
A program that uses threading and the SIDT instruction makes helgrind to fail with the assertion failure:

Helgrind: hg_main.c:4478 (instrument_mem_access): Assertion 'szB > 8 && szB <= 512' failed.

In my understanding this happens because instrument_mem_access() expects memory accesses of size 1,2,4 and >=8 bytes, but not of 6 bytes, like the SIDT instruction is doing.

Just changing the assert in hg_main.c to allow szB==6 makes helgrind to work.

I'm using valgrind 13.0 compiled from source in a Ubuntu 14.04 x64 system running a 32 bit program.