Comments (3)
Hi David,
Sorry it took me so long to get back to you; I've been working on solving #1. Basically, the problem is this: when ASan or UBSan are preloaded, they define certain coverage symbols, and those take precedence over the symbols defined in libFuzzer (which is loaded later). When statically linked, this is solved by ASan/UBSan having weak versions of those symbols, meaning the libFuzzer symbols take precedence. But when they're preloaded, that doesn't work, and libFuzzer doesn't get coverage info. This actually affects native code too, not just Python code.
I've got a solution, but it's horrid. It involves generating patched versions of ASan/UBSan that don't export the weak symbols that should belong to libFuzzer. However, the patch is really fragile. Better solutions would be to either (1) modify LLVM to generate these modified ASan and UBSan shared objects itself, or (2) statically link ASan/UBSan and libFuzzer into the python runtime, and don't link libFuzzer into the Atheris extension.
For question #2, everything should work just like libFuzzer.
For question #3, I think g++ would work too, as long as the pieces were compiled with clang++, but I'm not sure about that.
from atheris.
Hi David,
I've updated Atheris with a solution to #1. It doesn't work (yet) with OSS-Fuzz, but seems to solve all the problems. It's much less horrid than my other solution, thankfully!
from atheris.
Thanks a lot for your explanation as well as the update. Looking forward to following this project.
from atheris.
Related Issues (20)
- publish wheels for macOS Python 3.10 HOT 1
- Installation doesn't work with clang 15
- WARNING: Failed to find function "__sanitizer_acquire_crash_state". HOT 2
- Coverage for Tensorflow not show up HOT 1
- GCOV instrumentation `.gcda` fails when run by atheris HOT 2
- Hall of fame addition HOT 1
- Help with installation on ARM HOT 3
- Please add a tag for the latest release HOT 3
- Potential file conflict with other Python packages HOT 3
- Instrumenting time long HOT 3
- Aggregate all string literals during instrumentation HOT 1
- Unable to cast Python instance to C++ HOT 8
- Unable to execute target in fork mode HOT 2
- Generate wheels for all platforms via cibuildwheel HOT 3
- "Permission denied" when using -merge=1
- Preloaded libFuzzer doesn't allow to use custom mutator.
- Wrong crash line in new python version
- Atheris 2.2.2 fails to instrument a while loop in Python 3.11.0 HOT 1
- Support RegisterPostProcessor in lib protofuf mutator
- Make use of Github Actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atheris.