Skip to content

ASLR introduces non-determinism #359

@bmwiedemann

Description

@bmwiedemann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions