-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Invalid section names in Mach-O file on OS X w/ custom target spec #22915
Comments
So, to be clear, the problem here is specifically that rustc generates invalid data for creating mach-o object files? |
Interesting. This call to get_metadata_section is the relevant code. |
@huonw I think so, but I'm not sure where the section names (and segment names in Mach-O) get emitted. I intended |
Triage: no changes I'm aware of |
Presently, the compiler dies with the error
when given a json for Leaving the field out altogether triggers this error:
So it's unknown whether ELF sections are still produced, since those would be linker errors. |
Before ====== AFL is a coverage guided fuzzer. Prior to these changes, afl.rs would rely on [an LLVM pass] to instrument the fuzz target and get insight into the code branches hit by the fuzzer. Depending on the user's system, sometimes the ABI stars would align and this would work. But [seemingly most of the time][problems], it was a headache for many users. [an LLVM pass]: https://github.com/rust-fuzz/afl.rs/tree/6d5b5256d7a9a4909a00ba86501be7c9687cd56e/afl-plugin [problems]: #57 After ==== With these changes, the LLVM pass is no longer necessary. Instead of using AFL's own LLVM pass for instrumentation, this pull request migrates to LLVM's built-in execution tracing feature `trace-pc-guard` which [AFL supports]. Effectively, these changes makes fuzzing Rust code with AFL _much_ easier than before. In particular: - No longer requires unstable Rust features - Works on all Rust channels (stable, beta, nightly) - No longer need to modify the Rust crate being fuzzed, just write the fuzz target - Linux-only for now, but if [this Rust bug] gets fixed, it'll work on macOS [AFL supports]: https://github.com/mirrorer/afl/blob/2fb5a3482ec27b593c57258baae7089ebdc89043/llvm_mode/README.llvm#L169-L188 [this Rust bug]: rust-lang/rust#22915
Before ====== AFL is a coverage guided fuzzer. Prior to these changes, afl.rs would rely on [an LLVM pass] to instrument the fuzz target and get insight into the code branches hit by the fuzzer. Depending on the user's system, sometimes the ABI stars would align and this would work. But [seemingly most of the time][problems], it was a headache for many users. [an LLVM pass]: https://github.com/rust-fuzz/afl.rs/tree/6d5b5256d7a9a4909a00ba86501be7c9687cd56e/afl-plugin [problems]: #57 After ==== With these changes, the LLVM pass is no longer necessary. Instead of using AFL's own LLVM pass for instrumentation, this pull request migrates to LLVM's built-in execution tracing feature `trace-pc-guard` which [AFL supports]. Effectively, these changes makes fuzzing Rust code with AFL _much_ easier than before. In particular: - No longer requires unstable Rust features - Works on all Rust channels (stable, beta, nightly) - No longer need to modify the Rust crate being fuzzed, just write the fuzz target - Linux-only for now, but if [this Rust bug] gets fixed, it'll work on macOS [AFL supports]: https://github.com/mirrorer/afl/blob/2fb5a3482ec27b593c57258baae7089ebdc89043/llvm_mode/README.llvm#L169-L188 [this Rust bug]: rust-lang/rust#22915
Before ====== AFL is a coverage guided fuzzer. Prior to these changes, afl.rs would rely on [an LLVM pass] to instrument the fuzz target and get insight into the code branches hit by the fuzzer. Depending on the user's system, sometimes the ABI stars would align and this would work. But [seemingly most of the time][problems], it was a headache for many users. [an LLVM pass]: https://github.com/rust-fuzz/afl.rs/tree/6d5b5256d7a9a4909a00ba86501be7c9687cd56e/afl-plugin [problems]: #57 After ==== With these changes, the LLVM pass is no longer necessary. Instead of using AFL's own LLVM pass for instrumentation, this pull request migrates to LLVM's built-in execution tracing feature `trace-pc-guard` which [AFL supports]. Effectively, these changes makes fuzzing Rust code with AFL _much_ easier than before. In particular: - No longer requires unstable Rust features - Works on all Rust channels (stable, beta, nightly) - No longer need to modify the Rust crate being fuzzed, just write the fuzz target - Linux-only for now, but if [this Rust bug] gets fixed, it'll work on macOS [AFL supports]: https://github.com/mirrorer/afl/blob/2fb5a3482ec27b593c57258baae7089ebdc89043/llvm_mode/README.llvm#L169-L188 [this Rust bug]: rust-lang/rust#22915
* Rewerite of afl.rs; introduction of cargo-afl. Before ====== AFL is a coverage guided fuzzer. Prior to these changes, afl.rs would rely on [an LLVM pass] to instrument the fuzz target and get insight into the code branches hit by the fuzzer. Depending on the user's system, sometimes the ABI stars would align and this would work. But [seemingly most of the time][problems], it was a headache for many users. [an LLVM pass]: https://github.com/rust-fuzz/afl.rs/tree/6d5b5256d7a9a4909a00ba86501be7c9687cd56e/afl-plugin [problems]: #57 After ==== With these changes, the LLVM pass is no longer necessary. Instead of using AFL's own LLVM pass for instrumentation, this pull request migrates to LLVM's built-in execution tracing feature `trace-pc-guard` which [AFL supports]. Effectively, these changes makes fuzzing Rust code with AFL _much_ easier than before. In particular: - No longer requires unstable Rust features - Works on all Rust channels (stable, beta, nightly) - No longer need to modify the Rust crate being fuzzed, just write the fuzz target - Linux-only for now, but if [this Rust bug] gets fixed, it'll work on macOS [AFL supports]: https://github.com/mirrorer/afl/blob/2fb5a3482ec27b593c57258baae7089ebdc89043/llvm_mode/README.llvm#L169-L188 [this Rust bug]: rust-lang/rust#22915 * progress * progress * progress * progress * progress * reapi a thing * remove a bunch of unnecessarily committed files * ignore basically everything in the afl dir * make tests pass
Hi, I just want to point out that it seems to me that this bug is fixed in rust beta and nightly. |
just confirmed this is fixed for me too! afl.rs now works on mac |
Gonna close this. If anyone else encounters this, let me know and I'll reopen |
Despite a valid target specification for
i686-unknown-plan9
, which is intended to produce a statically linked Mach-O,I cannot even build libcore because rustc still tries to produce a Mach-O with invalid, ELF-like section names:
The text was updated successfully, but these errors were encountered: