[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
mitz at apple.com
mitz at apple.com
Wed Jan 20 22:26:39 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit bdefb12afed667e4de150fe6954d877ddbfa1940
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jan 16 19:29:26 2010 +0000
<rdar://problem/7529519> DumpRenderTree crashes in makeLargeMallocFailSilently()
Reviewed by Mark Rowe.
* DumpRenderTree/mac/CheckedMalloc.cpp:
(makeLargeMallocFailSilently): Temporarily allow writing to the default
malloc zone structure while modifying it.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 15be1e3..40e47bd 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-16 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/7529519> DumpRenderTree crashes in makeLargeMallocFailSilently()
+
+ * DumpRenderTree/mac/CheckedMalloc.cpp:
+ (makeLargeMallocFailSilently): Temporarily allow writing to the default
+ malloc zone structure while modifying it.
+
2010-01-16 David Kilzer <ddkilzer at apple.com>
Added back removed properties to iExploder input files
diff --git a/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
index 85d0613..faef760 100644
--- a/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
+++ b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
* (C) 2007 Graham Dennis (graham.dennis at gmail.com)
* (C) 2007 Eric Seidel <eric at webkit.org>
*
@@ -32,6 +32,7 @@
#import "CheckedMalloc.h"
#import <malloc/malloc.h>
+#import <sys/mman.h>
static void* (*savedMalloc)(malloc_zone_t*, size_t);
static void* (*savedRealloc)(malloc_zone_t*, void*, size_t);
@@ -53,8 +54,19 @@ static void* checkedRealloc(malloc_zone_t* zone, void* ptr, size_t size)
void makeLargeMallocFailSilently()
{
malloc_zone_t* zone = malloc_default_zone();
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ vm_address_t pageStart = reinterpret_cast<vm_address_t>(zone) & static_cast<vm_size_t>(~(getpagesize() - 1));
+ vm_size_t len = reinterpret_cast<vm_address_t>(zone) - pageStart + sizeof(malloc_zone_t);
+ mprotect(reinterpret_cast<void*>(pageStart), len, PROT_READ | PROT_WRITE);
+#endif
+
savedMalloc = zone->malloc;
savedRealloc = zone->realloc;
zone->malloc = checkedMalloc;
zone->realloc = checkedRealloc;
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ mprotect(reinterpret_cast<void*>(pageStart), len, PROT_READ);
+#endif
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list