Bug 123211
| Summary: | Grow method in ArgumentEncoder.cpp does not return aligned address | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | jernkuan+bugzilla |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | UNCONFIRMED | ||
| Severity: | Normal | CC: | andersca, ap |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Other | ||
| OS: | Other | ||
jernkuan+bugzilla
From Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp
The grow method attempts to grow the buffer to fit data of a specified size. And the address should be aligned to a specific memory boundary from what i understand.
However it is not doing so returning a non-aligned address. It just just returning where alignedSize is always a multiple of alignment.
return m_buffer + alignedSize;
Subsequently it is asserting on the ARM platform with GCC compiler when reinterpret_cast_ptr is called to check on it's alignment of the address been passed in.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Anders Carlsson
(In reply to comment #0)
> From Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp
>
> It just just returning where alignedSize is always a multiple of alignment.
That's the whole point of the grow function.
jernkuan+bugzilla
But should the grow method return an aligned address?