Open GabrielMajeri opened 6 years ago
That's weird and wrong, the disassembly should have been truncated after the retq
instruction.
Can you post exactly which system are you on? Which linux, which version of objdump
, etc. ?
Do you have any RUSTFLAGS
or .cargo/config
?
The int3
instruction is 1 byte long so it could be used to align the function but... I've never run into this :/
cc @alexcrichton
@gnzlbg AFAIK int $3
is simply the default padding between functions, will trigger a breakpoint when running under a debugger.
Found the issue: I had enabled LLD as my linker globally
linker = "clang"
rustflags = [ "-C", "link-arg=-fuse-ld=lld" ]
Using ld
instead doesn't break the tests.
LLD version: LLD 6.0.1 (compatible with GNU linkers)
, installed from the ArchLinux package repository
objdump version: GNU objdump (GNU Binutils) 2.31.1
I think we should try to fix assert_instr
to work with lld
. Enabling cross-language inlining for sleef will require using lld
as a linker so this is a problem we'll have to solve anyways. I'm renaming this issue.
Odd! It may be the case that ld
doesn't emit informating saying the padding is part of the function whereas LLD does emit that information? This would also be reasonably easy enough to prune in the assert-instr crate as well
Tried running
./ci/run.sh
, everything ran smoothly until:${TARGET}
:x86_64-unknown-linux-gnu
rustc:rustc 1.30.0-nightly (6e0f1cc15 2018-09-05)