[Webkit-unassigned] [Bug 20990] FreeBSD Alpha, >3000 cast alignment warnings on build, unaligned access errors on run
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 25 06:51:04 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=20990
------- Comment #4 from mexas at bris.ac.uk 2008-09-25 06:51 PDT -------
(In reply to comment #1)
> See also: bug 19775.
>
The patches to
JavaScriptCore/wtf/Vector.h:
WebCore/platform/text/StringHash.h
were successful. I reduced the number of alignment warnings from >3000
down to 600.
However, the patch for JavaScriptCore/wtf/ListHashSet.h is not having the
effect:
./JavaScriptCore/wtf/ListHashSet.h:169: warning: cast from 'uint32_t*' to
'WTF::ListHashSetNode<WebCore::HTMLFormControlElementWithState*>*' increases
required alignment of target type
I applied the patch just as in bug report 19775:
--- JavaScriptCore/wtf/ListHashSet.h.orig Tue Jul 8 23:23:01 2008
+++ JavaScriptCore/wtf/ListHashSet.h Tue Jul 8 23:24:03 2008
@@ -122,7 +122,7 @@ namespace WTF {
: m_freeList(pool())
, m_isDoneWithInitialFreeList(false)
{
- memset(m_pool.pool, 0, sizeof(m_pool.pool));
+ memset(m_pool, 0, sizeof(m_pool));
}
Node* allocate()
@@ -166,7 +166,7 @@ namespace WTF {
}
private:
- Node* pool() { return reinterpret_cast<Node*>(m_pool.pool); }
+ Node* pool() { return reinterpret_cast<Node*>(m_pool); }
Node* pastPool() { return pool() + m_poolSize; }
bool inPool(Node* node)
@@ -177,10 +177,7 @@ namespace WTF {
Node* m_freeList;
bool m_isDoneWithInitialFreeList;
static const size_t m_poolSize = 256;
- union {
- char pool[sizeof(Node) * m_poolSize];
- double forAlignment;
- } m_pool;
+ uint32_t m_pool[(sizeof(Node) * m_poolSize + sizeof(uint32_t) - 1) /
sizeof(uint32_t)];
};
template<typename ValueArg> struct ListHashSetNode {
Line 169 is the one with reinterpred_cast.
Not sure what to do next.
anton
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list