google / syzygy

Syzygy Transformation Toolchain
Apache License 2.0
355 stars 59 forks source link

Instrumentation fails - Unexpected data label at offset #61

Open nevilad opened 6 years ago

nevilad commented 6 years ago

I'm running afl instrumentation with verbose=1 and it fails with these warnings: Block "BlockName" has an unsupported code-data layout Unexpected data label at offset XXXX

The place, where this message is displayed, contains this comment: // If a non-data label was already encountered, and now there's another // data label then bail: the block does not respect the 'code first, // data second' supported layout requirement.

The questions are: 1) How to find the address of the problem? The warning contains an offset, but what is the base for it? 2) Means 'code first, data second' that the code can only reference data which is placed at greater addresses than this code?

nevilad commented 6 years ago

Added additional logging. Instrumenter writes about wrong code-data layout of a function, but the labels in the output, are from another function. There is a bug, probably in getting function address range.