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

ruff binary varies from ASLR #12169

Open
bmwiedemann opened this issue Jul 3, 2024 · 3 comments
Open

ruff binary varies from ASLR #12169

bmwiedemann opened this issue Jul 3, 2024 · 3 comments

Comments

@bmwiedemann
Copy link

While working on reproducible builds for openSUSE, I found that
our python-ruff package varies from Address-Space-Layout-Randomization (ASLR).

I reproduced this with both 0.5.0 and 0.4.10.

It is a variation that happens with low-entropy - maybe just 1 bit, so occasionally, two identical ruff binaries are produced.

I uploaded two 0.5.0 binaries and a diff into http://rb.zq1.de/other/python-ruff/ - maybe something related to rust/llvm.

@MichaReiser
Copy link
Member

MichaReiser commented Jul 3, 2024

Scanning through the diff, it seems that most (all?) are related to the libCST dependency.

Maybe a non-determinism in their macro?

@bmwiedemann
Copy link
Author

grep ^- ruff-strings-diff.txt | grep -vi libcst also shows

-anon.ea5251168591221b31fa999991ef59a1.39.llvm.6396498261944353430
-_ZN60_$LT$alloc..string..String$u20$as$u20$core..fmt..Display$GT$3fmt17hb6d27bec17dc24a4E.llvm.1673184941240675199

@bmwiedemann
Copy link
Author

There is indeed an issue with rust/llvm LTO in libCST Instagram/LibCST#1213 - but not sure if this is the only issue here.

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