-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong basic block boundaries in several binaries #31
Comments
Hello, the first two bugs arose from improper handling of duplicate sections. The __cxx_global_var_init.8 was introduced following the compilation of step-14.cc, and the disassembly results are presented below:
The ground truth is correct after compling
However, Note that there are four special sections that need to be handled. The compiled dealII.zip after fixing is attached. |
Hello, for the third case, we identified that the root cause is the incorrect handling of the
We are planing to handle the corner case in gas assembler. |
Thanks a lot for the quick response! I guess that means some of the binaries need to be rebuilt. Right? |
For completeness (for other people using this dataset), some arm (non-thumb) binaries have also problems with For each binary, I provide a snippet of assembly where "GOOD" instructions are instructions present in the ground truth, and "BAD" instructions are absent. In all of these, "GOOD" instructions must fallthrough to "BAD" instructions, which tells me something wrong is going on with the ground truth.
Here is a list of all the other binaries where I have found inconsistent ground truth. Some of these might be due to the duplicate section problem or maybe there is something else going on. aarch64
x86
I think it is very unlikely that |
I've noticed a few places where the ground truth seems to be wrong. This is, I believe, and different case from #28 where capstone was to blame. In the following cases, the
extract_gt
script reports errors.intel_executables/cpu2006/clang_Os/dealII_base.amd64-m64-ccr-Os
There is a fragment of code that looks like this:
But
404043: call _ZN16ConstantFunctionILi3EEC1Edj
is not part of the ground truth, even though40403e
belongs to it.The
extract_gt
script produces the following output:What could cause this instruction to be missing?
milc_base.aarch64-ccr-O2
The
4168c0: ret
instruction is missing from the ground truth (even though4168bc: fmov d0,xzr
is present).The
extract_gt
log:Same, what could be going wrong here? One thing I notice is that the basic block seems to be duplicated in these two examples.
E.g. in the latter, we have
BBL#2621
andBBL#2622
with the same boundaries. Could that have something to do?soplex_base.arm32-gcc81-mthumb_final-O2
Here we have the following snippet:
The
udf
instruction is missing from the ground truth, even though18234: ldr r3, [r3]
is present.This pattern is generated when there is a null pointer access (see e.g. https://embedded.fm/blog/2017/3/6/exceptional-code)
The
extract_gt
log contains the following:This pattern in particular happens in a lot of the thumb binaries and the
udf
instruction seems to be missing every time (in close to 200 binaries). I would guess this is a different issue than the previous two.The text was updated successfully, but these errors were encountered: