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

✨ An option to disable ASLR #360

Open
burgholzer opened this issue Jun 21, 2023 · 2 comments
Open

✨ An option to disable ASLR #360

burgholzer opened this issue Jun 21, 2023 · 2 comments
Labels
c++ Anything related to C++ code DD Anything related to the DD package feature New feature or request good first issue Good for newcomers

Comments

@burgholzer
Copy link
Member

What's the problem this feature will solve?

The DD package as it is currently implemented relies on the memory addresses of nodes for hashing (pointer-based DD package). Modern compilers and operating systems implement Address Space Layout Randomization (ASLR) as a security measure to randomize the location of code.
This, however, leads to non-deterministic behavior of the decision diagram package because different invocations of the same computation are allocated in different memory regions and hence hash values might differ.

Describe the solution you'd like

It would be convenient, especially for debugging, to have an option for disabling ASLR and, thus, enabling reproducible builds.
AFAIK, the way to achieve this is platform-specific, but there should be enough about this out there.
Ideally, it gets integrated into the cmake/ folder as an additional standalone script.

Note
This issue becomes somewhat obsolete if we ever decide to switch to an index-based DD package implementation.

@burgholzer burgholzer added good first issue Good for newcomers feature New feature or request DD Anything related to the DD package c++ Anything related to C++ code labels Jun 21, 2023
@hillmich
Copy link
Collaborator

If I recall correctly, ASLR is a feature of the OS and the compiler only cares about PIE (Position Independent Executable) to work with ASLR.

I don't know if disabling PIE helps with this issue.

@burgholzer
Copy link
Member Author

That could very well be the case.
Although I remember that I got reproducible builds working once on my Intel-based Mac. Don't know about other platforms though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code DD Anything related to the DD package feature New feature or request good first issue Good for newcomers
Projects
Status: Todo
Status: Todo
Development

No branches or pull requests

2 participants