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

Question: Can the randomization code be separated out and called within a library #32

Open
ojwoodford opened this issue Sep 28, 2023 · 1 comment

Comments

@ojwoodford
Copy link

It's great that you've decided to maintain this tool ❤️

I am interested in doing all the memory layout randomization from within an LLVM compiled application of my own. I write in Julia (a programming language compiled using LLVM), and we're discussing how we can make our benchmarking tools handle memory layout issues better. My idea is to call a function that does the randomization, between benchmark evaluations.

Is the randomization functionality nicely encapsulated within a single C++ function? If so, which one? If not, is it possible to make it so? Perhaps only some of the randomization is possible this way? Perhaps it isn't possible to shuffle code about while it's running?

Many thanks 🙏

@magras
Copy link
Collaborator

magras commented Oct 8, 2023

I think you are looking for onTimer(). It's called every 250 ms to rerandomize stack and functions layout.

But there are problems with stabilizer that I don't know how to solve with reasonable effort. Check other open issues before proceeding further ahead.

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

No branches or pull requests

2 participants