This change ensures that base_unittests will not segfault on this.
I actually managed to crash it. I had /dev/shm unmounted by accident. In these conditions the test fail and you get SIGSEGV. Patch by Pawel Hajdan jr <phajdan.jr@gmail.com> git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2121 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -118,6 +118,9 @@ TEST(SharedMemoryTest, OpenClose) {
|
||||
EXPECT_TRUE(rv);
|
||||
EXPECT_NE(memory1.memory(), memory2.memory()); // Compare the pointers.
|
||||
|
||||
// Make sure we don't segfault. (it actually happened!)
|
||||
ASSERT_NE(memory1.memory(), static_cast<void*>(NULL));
|
||||
ASSERT_NE(memory2.memory(), static_cast<void*>(NULL));
|
||||
|
||||
// Write data to the first memory segment, verify contents of second.
|
||||
memset(memory1.memory(), '1', kDataSize);
|
||||
|
Reference in New Issue
Block a user