Crash @ bmalloc::Environment::computeIsBmallocEnabled
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Aug 2015 21:31:30 +0000 (21:31 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Aug 2015 21:31:30 +0000 (21:31 +0000)
commitbb93e8cdad61c335c16341a45d2a7242d0fd1327
treee1ee01bb31aeba7ae6f6326ae6ee79903ad824be
parent75482948fa88abd13ff249c19c58069900d63b5e
Crash @ bmalloc::Environment::computeIsBmallocEnabled
https://bugs.webkit.org/show_bug.cgi?id=148183

Reviewed by NOBODY Michael Saboff.

CrashTracer says we have some crashes beneath computeIsBmallocEnabled
dereferencing null in strstr. We null check getenv but not
_dyld_get_image_name, so deduction indicates that _dyld_get_image_name
must be returning null. _dyld_get_image_name isn't really documented,
so let's assume it can return null.

* bmalloc/Environment.cpp:
(bmalloc::isASanEnabled): Check _dyld_get_image_name's return value for
null because we can't prove it won't be null.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/Environment.cpp