Skip to content

Commit

Permalink
Abort: change the magic value written to NULL
Browse files Browse the repository at this point in the history
Make sure that the magic value can be cast to a char properly.

BUG=724399,b:70905156

Review URL: https://chromiumcodereview.appspot.com/10541122

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141814 0039d316-1c4b-4281-b951-d872f2087c98
(cherry picked from commit b9ccf65)
Signed-off-by: Gabriel Marin <gmx@chromium.org>

Change-Id: I31162aefe53624f4bc61a6b2bc6fe83f9df5ff68
Reviewed-on: https://chromium-review.googlesource.com/1130779
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578736}
  • Loading branch information
jln@chromium.org authored and Commit Bot committed Jul 27, 2018
1 parent e7bdcaa commit d858be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/tcmalloc/chromium/src/base/abort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace tcmalloc {
ATTRIBUTE_NOINLINE void Abort() {
// Make a segmentation fault to force abort. Writing to a specific address
// so it's easier to find on crash stacks.
*(reinterpret_cast<volatile char*>(NULL) + 57) = 0x2001;
*(reinterpret_cast<volatile char*>(NULL) + 57) = 0x21;
}

} // namespace tcmalloc

0 comments on commit d858be3

Please sign in to comment.