Bug 360519 - none/tests/arm64/memory.vgtest might fail with newer gcc
Summary: none/tests/arm64/memory.vgtest might fail with newer gcc
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.11 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 12:57 UTC by Mark Wielaard
Modified: 2016-03-15 13:57 UTC (History)
0 users

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


Attachments
Place nops around ldr literal test instruction and adjust expected output (3.75 KB, patch)
2016-03-14 12:58 UTC, Mark Wielaard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2016-03-14 12:57:43 UTC
The LDR (literal, int reg) testcase take a code label and compare the instructions around the label with known instructions in the code stream. The comment says:

// This is a bit tricky.  We load the value from just before and
// just after the actual instruction.  Because TESTINSN2_hide2 
// generates two fixed insns either side of the test insn, these 
// should be constant and hence "safe" to check.

However two fixed insns on either side of the checking instruction isn't enough given that offsets of +/-8 are used, instructions are only 4 wide and the values loaded are 64bit.

Newer gcc versions would generate different code around the label and cause the tests to fail,

The proposed solution is to add enough nops around the actual instruction to really give known expected constant values to check against.

Reproducible: Always
Comment 1 Mark Wielaard 2016-03-14 12:58:53 UTC
Created attachment 97892 [details]
Place nops around ldr literal test instruction and adjust expected output
Comment 2 Julian Seward 2016-03-15 13:34:38 UTC
(In reply to Mark Wielaard from comment #1)
> Place nops around ldr literal test instruction and adjust expected output

Looks good to me!
Comment 3 Mark Wielaard 2016-03-15 13:57:04 UTC
valgrind svn r15829