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

ASLR introduces non-determinism #359

Open
bmwiedemann opened this issue Jan 21, 2025 · 0 comments
Open

ASLR introduces non-determinism #359

bmwiedemann opened this issue Jan 21, 2025 · 0 comments

Comments

@bmwiedemann
Copy link

While working on reproducible builds for openSUSE, I found that
our intel-graphics-compiler v2.5.6 varies between builds.

My tools show, that variations go away when I disable Address-Space-Layour-Randomization(ASLR) during the build.

Two source files differed thus:

/home/abuild/rpmbuild/BUILD/build/IGC/Release/bif/embedder/OCLBiFImpl__igc_bif_BIFBC_122.cpp
@@ -2,49 +2,49 @@
 
 unsigned char __attribute__((visibility("default"))) _igc_bif_BIFBC_122[] = {
         0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x03, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x8c, 0x4e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x57, 0x56, 0x00, 0x00, 0x8c, 0x4e, 0x04, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x34, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x57, 0x56, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x8c, 0x4e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd7, 0x55, 0x00, 0x00, 0x8c, 0x4e, 0x04, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x34, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xd7, 0x55, 0x00, 0x00,
...

/home/abuild/rpmbuild/BUILD/build/IGC/VectorCompiler/lib/BiF/VCBuiltins64.cpp
@@ -3,65 +3,65 @@
 #include "IGC/common/StringMacros.hpp"
 #include "llvm/ADT/StringRef.h"

-static unsigned char VCBuiltins64RawDataPLTF0[] = { 0x42, 0x43, 0xC0, 0xDE, 0x35, 0x14, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x62, 0xC, 0x30, 0x24, 0x4A, 0x59, 0xBE, 0x66, 0x8D, 0xFB, 0xB4, 0x9F, 0xB, 0x51, 0x80, 0x4C, 0x1, 0x0, 0x0,...
+static unsigned char VCBuiltins64RawDataPLTF0[] = { 0x42, 0x43, 0xC0, 0xDE, 0x35, 0x14, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x62, 0xC, 0x30, 0x24, 0x4A, 0x59, 0xBE, 0x66, 0x8D, 0xFB, 0xB4, 0x9F, 0xB, 0x51, 0x80, 0x4C, 0x1, 0x0, 0x0,...
[... more similar diffs here ...]

See https://github.com/bmwiedemann/theunreproduciblepackage/tree/master/aslr for examples of how ASLR can add non-determinism.

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

1 participant