Skip to content
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

make shadow-stack based unwinding reusable for other projects? #8

Open
milianw opened this issue May 20, 2019 · 2 comments · May be fixed by koute/not-perf#37
Open

make shadow-stack based unwinding reusable for other projects? #8

milianw opened this issue May 20, 2019 · 2 comments · May be fixed by koute/not-perf#37

Comments

@milianw
Copy link

milianw commented May 20, 2019

Hey there,

super cool project! I wonder, would it be possible to make your shadow-stack based unwinding trick reusable for other projects? It would definitely benefit me in heaptrack, and I bet it would benefit others too.

@koute
Copy link
Owner

koute commented May 20, 2019

Certainly!

It should be relatively straightforward to make a library with a replacement for _Unwind_Backtrace. Basically, you'd just take the code from preload/src/unwind.rs, modify it a little, wrap it in a C API, put it inside of a cdylib crate (it'd probably be the best to put it in the not-perf repo), and you'd have an .so which is callable from any language.

@milianw
Copy link
Author

milianw commented May 20, 2019

I have zero rust experience, but if you have a C API I can play with, I'd like to test it out.

I suggest you don't shadow existing API though, better use different names. If anyone wants to replace _Unwind_Backtrace they should do that themselves.

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 a pull request may close this issue.

2 participants