Skip to content

Support more environments with libyafl#10

Draft
take-cheeze wants to merge 2 commits into
samyeyo:mainfrom
take-cheeze:libyafl
Draft

Support more environments with libyafl#10
take-cheeze wants to merge 2 commits into
samyeyo:mainfrom
take-cheeze:libyafl

Conversation

@take-cheeze

Copy link
Copy Markdown
Contributor

@take-cheeze

Copy link
Copy Markdown
Contributor Author

I'm facing some issue in SEGV in std::function::target with libcxx+no-rtt environment like macos

@samyeyo

samyeyo commented Jul 1, 2026

Copy link
Copy Markdown
Owner

I can confirm that coroutine based Lua scripts, compiled with clx, are crashing on macOS ARM64.
It's a good idea to look for third party (if possible tiny) library for similar ucontext switch, or maybe exploring with C++ coroutines

@take-cheeze

Copy link
Copy Markdown
Contributor Author

Boost.Context was another candidate but libyafl seems to be more maintained and tested.
I'm also interested using c++20 coroutines too. But it's only stackless coroutine so may not fit current emitted c++ code.

I'd like to have working CI for at least Windows and macOS to land this PR so keeping to draft for a while

@samyeyo

samyeyo commented Jul 2, 2026

Copy link
Copy Markdown
Owner

I think it might be done with just single lines of asm on ARM64 without third party library... I am currently on it

@samyeyo

samyeyo commented Jul 3, 2026

Copy link
Copy Markdown
Owner

The ARM64/macOS ucontext‑like implementation is now working 👍
It switches stacks and restores the full register context using only a few assembly instructions.
I still need to run additional tests and validation before committing it.

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.

2 participants