Comments (3)
Thanks for your help I read through the native extension doc and re-read the readme, and tried compiling llvm to see if that fixed my issue.
In case anyone else wants to install atheris on ARM/Raspberry Pi, I did -
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS='clang;compiler-rt' -G "Unix Makefiles" ../llvm
make -j 4 # This step is very slow
sudo make install
git clone https://github.com/google/atheris.git
cd atheris
CLANG_BIN="/usr/local/bin/clang" LIBFUZZER_LIB="/usr/local/lib/clang/16.0.0/lib/linux/libclang_rt.fuzzer_no_main-armhf.a" pip3 install .
When doing a simple test, I got -
ImportError: /home/pi/.local/lib/python3.9/site-packages/atheris/core_with_libfuzzer.cpython-39-arm-linux-gnueabihf.so: undefined symbol: __atomic_load_8
This could be fixed by doing -
LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1 python3.9 ex.py
Look forward to playing with atheris now!
from atheris.
It looks like those errors are being caused by libFuzzer being linked as a shared library in Atheris, as opposed to being statically linked into the executable.
I'm not very familiar with ARM, so I don't know what would be needed to allow libFuzzer to be linked dynamically.
However, it's possible you can avoid this problem by linking libFuzzer directly into Python. Follow these instructions:
https://github.com/google/atheris/blob/master/native_extension_fuzzing.md#option-2-linking-libfuzzer-into-python
Then, modify Atheris' setup.py to remove the atheris.core_with_libfuzzer
extension (you want the atheris.core_without_libfuzzer
one) and remove everything in build_extensions()
after # Deploy versions of ASan and UBSan that have been merged with libFuzzer
.
from atheris.
Hey @chrisruk after following your instructions I'm running into an Illegal Instruction
error:
$ LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1 python3.9 fuzz.py
INFO: Using built-in libfuzzer
Illegal instruction
Any idea on what is going wrong?
I'm using a Pi Zero armv6
with clang 13.0.1
.
from atheris.
Related Issues (20)
- 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. HOT 1
- 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
- How could I save crash log? HOT 6
- User exit callback feature? HOT 2
- Integrate Slipcover to Atheris HOT 2
- Cannot Install Atheris using PIP on Ubuntu, Alpine, ArchLinux and Windows HOT 6
- Issue in installing package atheris-libprotobuf-mutator on python base image
- Determinism HOT 1
- Atheris in unittests?
- Why are Instance methods not instrumented
- Order of calls to LF messes output
- Atheris fails to build on macOS 14.2.1 with Homebrew clang 17.0.6 HOT 1
- Create LeakSanitizer suppression rules to run with detect_leaks=1
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.