Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRegression on nightly since LLVM 8 upgrade: `thread` sanitizer doesn't compile anymore #53945
Comments
This comment has been minimized.
This comment has been minimized.
guidovranken
commented
Sep 4, 2018
|
I have the same issue. |
This comment has been minimized.
This comment has been minimized.
|
libfuzzer-sys, which is used by cargo-fuzz also fails with the same error: |
PaulGrandperrin
changed the title
Regression on nightly: /usr/bin/ld: __sancov_guards has both ordered [...] and unordered [...] sections
Regression on nightly since LLVM 8 upgrade: /usr/bin/ld: __sancov_guards has both ordered [...] and unordered [...] sections
Sep 4, 2018
Havvy
added
the
regression-from-stable-to-nightly
label
Sep 5, 2018
PaulGrandperrin
added a commit
to rust-fuzz/honggfuzz-rs
that referenced
this issue
Sep 6, 2018
PaulGrandperrin
added a commit
to rust-fuzz/honggfuzz-rs
that referenced
this issue
Sep 6, 2018
This comment has been minimized.
This comment has been minimized.
|
I progressed a little bit on narrowing down the root cause of the issue. cd /tmp
git clone https://github.com/rust-fuzz/honggfuzz-rs.git
cd honggfuzz-rs/example/
RUSTFLAGS="-Z sanitizer=thread" ./test.shIf you use the |
eddyb
removed
the
regression-from-stable-to-nightly
label
Sep 6, 2018
This comment has been minimized.
This comment has been minimized.
|
(The regression is nightly-to-nightly and recent, the label must've been an accident) |
PaulGrandperrin
changed the title
Regression on nightly since LLVM 8 upgrade: /usr/bin/ld: __sancov_guards has both ordered [...] and unordered [...] sections
Regression on nightly since LLVM 8 upgrade: `thread` sanitizer doesn't compile anymore
Sep 9, 2018
This comment has been minimized.
This comment has been minimized.
Shnatsel
commented
Sep 13, 2018
•
|
I am facing the same issue with address sanitizer on |
memoryruins
added
the
A-LLVM
label
Sep 15, 2018
This comment has been minimized.
This comment has been minimized.
|
I'd like to work on this. |
This comment has been minimized.
This comment has been minimized.
|
Some initial findings: That error is emited by ld when(I think) a section links to both both unordered and order sections. Ordered sections are defined by the presence of the LLVM emits this flag in From what I can see, I'll need to investigate further to determine how this flag is getting left off. |
This comment has been minimized.
This comment has been minimized.
|
I've determine that passing I suspect that this issue is caused by an interaction between LLVM's In this case, LLVM would no longer add the SHF_LINK_ORDER flag to the ELF section, resulting in a linker error due to the missing flag. However, this is all still somewhat speculative. I'm going to try to come up with a minimal reproduction, which can hopefully be induced to fail/succeed by toggling the |
This comment has been minimized.
This comment has been minimized.
|
TL;DR: As as a temporary workaround, pass I've now determined that this is definitely an LLVM bug. I've created a minimal reproduction, which only uses Clang and other LLVM tools, here: https://github.com/Aaron1011/llvm_arg_elim The issue occurs due to the behavior of LLVM's As I described in my previous comment, this results in LLVM leaving off the I'll be filing a bug with LLVM once I'm given an account on their bugtracker. For now, you can work around this issue by passing |
This comment has been minimized.
This comment has been minimized.
|
Using the When using the default (BFD) linker, the 'has both ordered and unordered' error appears to be triggered by two separate bugs:
|
PaulGrandperrin
added a commit
to rust-fuzz/honggfuzz-rs
that referenced
this issue
Oct 5, 2018
PaulGrandperrin
added a commit
to rust-fuzz/honggfuzz-rs
that referenced
this issue
Oct 5, 2018
This comment has been minimized.
This comment has been minimized.
|
I've managed to come up with a full fix locally. I'll be submitting my changes to LLVM tomorrow, and will post the Phabricator link(s) here once I do so. The cause of the issue:
In both of these cases, the BFD linker will see proper, 'ordered' |
This comment has been minimized.
This comment has been minimized.
|
Here are all of the LLVM patches I've submitted (checked-off items have been merged): |
This comment has been minimized.
This comment has been minimized.
|
Nice! Might be worth pushing them to our llvm fork so we can pick them up more quickly? |
This comment has been minimized.
This comment has been minimized.
|
I think it might be best to wait until they're (hopefully) all accepted by LLVM. Getting them into the rust LLVM fork is going to require cherry-picking some additional commits, and it's possible that the LLVM team might want some changes before my patches are merged. |
SingingTree
added a commit
to SingingTree/afl.rs
that referenced
this issue
Oct 22, 2018
SingingTree
referenced this issue
Oct 22, 2018
Merged
Work around linking issues from rust-fuzz/afl.rs#141, rust-lang/rust#53945 #144
frewsxcv
added a commit
to rust-fuzz/afl.rs
that referenced
this issue
Oct 23, 2018
This comment has been minimized.
This comment has been minimized.
|
Thank for all your work on this @Aaron1011. Any news? |
PaulGrandperrin commentedSep 4, 2018
Hi, the fuzzer I maintain is failing to build on the latest nightlies:
The interesting part of the error log seems to be:
You can find the full log here:
https://travis-ci.org/rust-fuzz/honggfuzz-rs/jobs/424079778
I bisected on my computer the exact rust version that fails and it seems to be related to the LLVM 8 upgrade.
This version works well:
This version doesn't: