mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
v8: fix pointer arithmetic undefined behavior
Clang branch release_33 would optimize out a != NULL check because of some undefined behavior. This is a floating patch as a backport of that fix. Committed: http://code.google.com/p/v8/source/detail?r=13570
This commit is contained in:
1 parent
82b3524bce
commit
5d4ac272c7
1 file changed
+2
-1
Vendored
+2
-1
@@ -320,7 +320,8 @@ class MemoryChunk {
|
||||
Space* owner() const {
|
||||
if ((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
|
||||
kFailureTag) {
|
||||
return reinterpret_cast<Space*>(owner_ - kFailureTag);
|
||||
return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) -
|
||||
kFailureTag);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user