WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
55368
Fix alignment warnings in ARMv7
https://bugs.webkit.org/show_bug.cgi?id=55368
Summary
Fix alignment warnings in ARMv7
Xan Lopez
Reported
2011-02-28 05:49:07 PST
ToT in ARMv7 has a lot of alignment related warnings, which makes really difficult any other kind of warning in the build. Attached patch uses reinterpret_cast_ptr macro in wtf/StdLibExtras to get rid of most of them, since in ARM this adjusts the alignment properly.
Attachments
alignment.diff
(11.23 KB, patch)
2011-02-28 06:11 PST
,
Xan Lopez
no flags
Details
Formatted Diff
Diff
Patch
(3.95 KB, patch)
2012-01-15 19:16 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Xan Lopez
Comment 1
2011-02-28 06:11:05 PST
Created
attachment 84048
[details]
alignment.diff
Xan Lopez
Comment 2
2011-03-01 05:39:06 PST
Comment on
attachment 84048
[details]
alignment.diff OK, this fails in a few places in debug builds because there's an ASSERT checking the correctness of the cast that uses __alignof__, which needs the size of the class, which is not available in many places (since we forward declare instead of including the header). I'll see if I can either fix it for good or at least attach a patch with the easy fixes.
Rob Buis
Comment 3
2012-01-09 07:48:04 PST
Xan, any update? This seems useful since it may obscure more important warnings, like not returning a value in a method that should return a value.
Rob Buis
Comment 4
2012-01-15 19:16:11 PST
Created
attachment 122580
[details]
Patch
Rob Buis
Comment 5
2012-01-15 19:18:25 PST
Adapted patch to compile against HEAD. The use of reinterpret_cast_ptr for debug builds everywhere turned out to be hard (at the very least intrusive) to fix (the __alignof__ problem), so I chose static_cast in a few places.
Ryuan Choi
Comment 6
2012-01-15 19:25:21 PST
***
Bug 60690
has been marked as a duplicate of this bug. ***
Filip Pizlo
Comment 7
2012-02-03 12:39:37 PST
Comment on
attachment 122580
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=122580&action=review
> Source/JavaScriptCore/heap/HandleTypes.h:38 > + static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(static_cast<void*>(slot->asCell())) : 0; }
What, exactly, are you getting by putting in this static_cast?
Rob Buis
Comment 8
2012-02-03 12:55:26 PST
(In reply to
comment #7
)
> (From update of
attachment 122580
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=122580&action=review
> > > Source/JavaScriptCore/heap/HandleTypes.h:38 > > + static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(static_cast<void*>(slot->asCell())) : 0; } > > What, exactly, are you getting by putting in this static_cast?
I am trying to emulate reinterpret_cast_ptr, which implicitly casts to void*, because actually using it and including StdLibExtras.h for these two files would mean including a lot more include files to fix build problems. In fact I gave up on that approach simply because there were so many files to fix. Cheers, Rob.
WebKit Review Bot
Comment 9
2012-02-03 12:59:14 PST
Comment on
attachment 122580
[details]
Patch Clearing flags on attachment: 122580 Committed
r106686
: <
http://trac.webkit.org/changeset/106686
>
WebKit Review Bot
Comment 10
2012-02-03 12:59:20 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug