Title: [172608] trunk/Source/bmalloc
- Revision
- 172608
- Author
- [email protected]
- Date
- 2014-08-14 14:39:47 -0700 (Thu, 14 Aug 2014)
Log Message
Fixed a bmalloc crash seen on the EWS bot
https://bugs.webkit.org/show_bug.cgi?id=135955
Reviewed by Andreas Kling.
* bmalloc/Syscall.h: Some CG APIs vm_copy their input buffers. If the
input buffer is a malloc region, that region will get marked Copy-On-Write
by the kernel. Calls to madvise() for COW regions fail and return EINVAL
on older OS X's. In 10.10, they still fail, but they do not return
EINVAL.
So, we can only ASSERT that our syscalls succeed starting with 10.10.
Modified Paths
Diff
Modified: trunk/Source/bmalloc/ChangeLog (172607 => 172608)
--- trunk/Source/bmalloc/ChangeLog 2014-08-14 21:36:40 UTC (rev 172607)
+++ trunk/Source/bmalloc/ChangeLog 2014-08-14 21:39:47 UTC (rev 172608)
@@ -1,5 +1,20 @@
2014-08-14 Geoffrey Garen <[email protected]>
+ Fixed a bmalloc crash seen on the EWS bot
+ https://bugs.webkit.org/show_bug.cgi?id=135955
+
+ Reviewed by Andreas Kling.
+
+ * bmalloc/Syscall.h: Some CG APIs vm_copy their input buffers. If the
+ input buffer is a malloc region, that region will get marked Copy-On-Write
+ by the kernel. Calls to madvise() for COW regions fail and return EINVAL
+ on older OS X's. In 10.10, they still fail, but they do not return
+ EINVAL.
+
+ So, we can only ASSERT that our syscalls succeed starting with 10.10.
+
+2014-08-14 Geoffrey Garen <[email protected]>
+
Fixed the bmalloc build
https://bugs.webkit.org/show_bug.cgi?id=135953
Modified: trunk/Source/bmalloc/bmalloc/Syscall.h (172607 => 172608)
--- trunk/Source/bmalloc/bmalloc/Syscall.h 2014-08-14 21:36:40 UTC (rev 172607)
+++ trunk/Source/bmalloc/bmalloc/Syscall.h 2014-08-14 21:39:47 UTC (rev 172608)
@@ -28,9 +28,21 @@
#include <errno.h>
+#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101000)
+
#define SYSCALL(x) do { \
while ((x) == -1) \
RELEASE_BASSERT(errno == EAGAIN); \
} while (0);
+#else
+
+// Older versions of OS X return EINVAL when trying to madvise COW pages. So, we
+// can't ASSERT that we'll only see EAGAIN.
+#define SYSCALL(x) do { \
+ while ((x) == -1 && errno == EAGAIN) { } \
+} while (0);
+
+#endif
+
#endif // Syscall_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes