Skip to content

Commit

Permalink
[msan] Nit: use init_origins parameter instead of __msan_get_track_or…
Browse files Browse the repository at this point in the history
…igins() in InitShadowWithReExec (#86994)

This fixes a nit I had accidentally introduced in
#85142

I don't think the value of __msan_get_track_origins() will change
between the start and end of InitShadowWithReExec, but it's cleaner to
use the parameter.
  • Loading branch information
thurstond authored Apr 1, 2024
1 parent 216b5e9 commit dc0cb17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/lib/msan/msan_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ bool InitShadowWithReExec(bool init_origins) {
// Start with dry run: check layout is ok, but don't print warnings because
// warning messages will cause tests to fail (even if we successfully re-exec
// after the warning).
bool success = InitShadow(__msan_get_track_origins(), true);
bool success = InitShadow(init_origins, true);
if (!success) {
# if SANITIZER_LINUX
// Perhaps ASLR entropy is too high. If ASLR is enabled, re-exec without it.
Expand All @@ -197,7 +197,7 @@ bool InitShadowWithReExec(bool init_origins) {

// The earlier dry run didn't actually map or protect anything. Run again in
// non-dry run mode.
return success && InitShadow(__msan_get_track_origins(), false);
return success && InitShadow(init_origins, false);
}

static void MsanAtExit(void) {
Expand Down

0 comments on commit dc0cb17

Please sign in to comment.