[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
slewis at apple.com
slewis at apple.com
Mon Dec 27 16:25:52 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e2249cfeceb87793b37a844492f972b69a14f95a
Author: slewis at apple.com <slewis at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 21 02:58:14 2010 +0000
Committing for Gavin since he needed to leave.
PPC build fix; stop using std::swap on PageAllocation/PageReservation,
this was failing on some compilers since the lack of default construction
for the m_executable/m_writable fields meant the value being swapped may
not have been fully initialized.
Patch by Gavin Barraclough <barraclough at apple.com> on 2010-12-20
* wtf/PageAllocation.h:
(WTF::PageAllocation::deallocate):
* wtf/PageBlock.h:
* wtf/PageReservation.h:
(WTF::PageReservation::deallocate):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index c8fd4cd..e927c5e 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-20 Gavin Barraclough <barraclough at apple.com>
+
+ PPC build fix; stop using std::swap on PageAllocation/PageReservation,
+ this was failing on some compilers since the lack of default construction
+ for the m_executable/m_writable fields meant the value being swapped may
+ not have been fully initialized.
+
+ * wtf/PageAllocation.h:
+ (WTF::PageAllocation::deallocate):
+ * wtf/PageBlock.h:
+ * wtf/PageReservation.h:
+ (WTF::PageReservation::deallocate):
+
2010-12-20 Oliver Hunt <oliver at apple.com>
Reviewed by Geoffrey Garen.
diff --git a/JavaScriptCore/wtf/PageAllocation.h b/JavaScriptCore/wtf/PageAllocation.h
index 74590b7..c83ccad 100644
--- a/JavaScriptCore/wtf/PageAllocation.h
+++ b/JavaScriptCore/wtf/PageAllocation.h
@@ -109,9 +109,15 @@ public:
void deallocate()
{
ASSERT(*this);
- PageAllocation tmp;
- std::swap(tmp, *this);
- OSAllocator::release(tmp.base(), tmp.size());
+
+ // Zero these before calling release; if this is *inside* allocation,
+ // we won't be able to clear then after the call to OSAllocator::release.
+ void* base = m_base;
+ size_t size = m_size;
+ m_base = 0;
+ m_size = 0;
+
+ OSAllocator::release(base, size);
}
private:
diff --git a/JavaScriptCore/wtf/PageBlock.h b/JavaScriptCore/wtf/PageBlock.h
index c810cab..500dbbe 100644
--- a/JavaScriptCore/wtf/PageBlock.h
+++ b/JavaScriptCore/wtf/PageBlock.h
@@ -44,7 +44,7 @@ public:
operator bool() const { return !!m_base; }
-private:
+protected:
void* m_base;
size_t m_size;
};
diff --git a/JavaScriptCore/wtf/PageReservation.h b/JavaScriptCore/wtf/PageReservation.h
index 7c5258a..0642350 100644
--- a/JavaScriptCore/wtf/PageReservation.h
+++ b/JavaScriptCore/wtf/PageReservation.h
@@ -98,9 +98,15 @@ public:
{
ASSERT(!m_committed);
ASSERT(*this);
- PageReservation tmp;
- std::swap(tmp, *this);
- OSAllocator::release(tmp.base(), tmp.size());
+
+ // Zero these before calling release; if this is *inside* allocation,
+ // we won't be able to clear then after the call to OSAllocator::release.
+ void* base = m_base;
+ size_t size = m_size;
+ m_base = 0;
+ m_size = 0;
+
+ OSAllocator::release(base, size);
}
private:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list