8000 Support sanitizer libaries by ligurio · Pull Request #38 · ligurio/luzer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support sanitizer libaries #38

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ligurio
Copy link
Owner
@ligurio ligurio commented Apr 8, 2025

No description provided.

@ligurio ligurio force-pushed the ligurio/gh-xxxx-build-sanitizer-libs branch 9 times, most recently from f933de2 to e269054 Compare April 10, 2025 16:40
@ligurio ligurio force-pushed the ligurio/gh-xxxx-build-sanitizer-libs branch 14 times, most recently from 815005a to 8e22406 Compare May 14, 2025 13:19
ligurio added 5 commits May 15, 2025 10:15
The patch adds a test that tests a target function implemented
using Lua C API. The current version of the test does not check
anything, because luzer can't pass a condition and reach `abort()`.

Needed for the following commit.
The patch adds a test that tests a target function implemented
in C and called using LuaJIT FFI. The current version of the test
does not check anything, because luzer can't pass condition and
reach `abort()`.

Needed for the following commit.
Needed for the following commit.
The patch makes libFuzzer install additional files at installation
time, which are .so files containing ASan+libFuzzer and
UBSan+libFuzzer. These files must be preloaded to allow use of
a sanitizer without having to modify Lua runtime.

1. google/atheris@6769fec
2. google/atheris@6c17ee4
3. https://github.com/google/atheris/blob/cbf4ad989dcb4d3ef42152990ed89cfceb50e059/native_extension_fuzzing.md
The patch renames a file version.c to config.c to make purpose
more general.

Required for the following commit.
The patch introduces a method `path()` that returns a path to
shared libraries with libFuzzer and sanitizers.
`require('luzer').path` returns a table with paths to shared
libraries with sanitizers:

```
> luzer.path
---
- ubsan: ./build/luzer/lf_ubsan.so
  asan: ./build/luzer/lf_asan.so
  ubsan_cxx: ./build/luzer/lf_ubsan_cxx.so
```

Usage: LD_PRELOAD=$(luajit -e "print(require('luzer').path.asan)") \
  luajit examples/example_basic.lua
@ligurio ligurio force-pushed the ligurio/gh-xxxx-build-sanitizer-libs branch from 8e22406 to 499f3e6 Compare May 15, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0