Bug 1469410 - UBSan false positive at tools/profiler/lul/LulMain.cpp:910:57. r=froydnj.
authorJulian Seward <jseward@acm.org>
Fri, 22 Jun 2018 10:03:06 +0200
changeset 480144 b04c3943f7b29472223bc78c29a43a28ad94f558
parent 480143 b92e2898ab18c5087924488be1b21de53db06b12
child 480145 3b8204a5fa3ab24e1d06db75a5748cb5c47a8475
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1469410
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1469410 - UBSan false positive at tools/profiler/lul/LulMain.cpp:910:57. r=froydnj.
tools/profiler/lul/LulMain.cpp
--- a/tools/profiler/lul/LulMain.cpp
+++ b/tools/profiler/lul/LulMain.cpp
@@ -902,18 +902,18 @@ TaggedUWord DerefTUW(TaggedUWord aAddr, 
     = CheckedUWord(aStackImg->mStartAvma) + CheckedUWord(aStackImg->mLen);
   if (!highest_requested_plus_one.isValid()     // overflow?
       || !highest_available_plus_one.isValid()  // overflow?
       || (highest_requested_plus_one.value()
           > highest_available_plus_one.value())) { // in range?
     return TaggedUWord();
   }
 
-  return TaggedUWord(*(uintptr_t*)(aStackImg->mContents + aAddr.Value()
-                                   - aStackImg->mStartAvma));
+  return TaggedUWord(*(uintptr_t*)(
+           &aStackImg->mContents[aAddr.Value() - aStackImg->mStartAvma]));
 }
 
 // RUNS IN NO-MALLOC CONTEXT
 static
 TaggedUWord EvaluateReg(int16_t aReg, const UnwindRegs* aOldRegs,
                         TaggedUWord aCFA)
 {
   switch (aReg) {