[webkit-reviews] review denied: [Bug 46713] JSC compile fails on 32bit platform when Regexp Tracing is enabled : [Attachment 69036] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 29 05:07:10 PDT 2010


Csaba Osztrogonac <ossy at webkit.org> has denied Peter Varga
<pvarga at inf.u-szeged.hu>'s request for review:
Bug 46713: JSC compile fails on 32bit platform when Regexp Tracing is enabled
https://bugs.webkit.org/show_bug.cgi?id=46713

Attachment 69036: proposed patch
https://bugs.webkit.org/attachment.cgi?id=69036&action=review

------- Additional Comments from Csaba Osztrogonac <ossy at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=69036&action=review

%lx expects "unsigned long int", but uintptr_t is
"unsigned long int" on 64 bit and "unsigned int" on 32 bit

sizeof(uintptr_t) == sizeof(unsigned long int) always,
but unfortunately unsigned int != unsigned long int. :(

I propose to cast unsigned long int with reinterpret_cast and use %014lx.
I prefer reinterpret_cast instead of obsolete C style cast



On 64 bit machine:
-------------------
sizeof(int) = 4
sizeof(long int) = 8
sizeof(long long int) = 8
sizeof(uintptr_t) = 8

sizeof(uintptr_t) == sizeof(unsigned long int) == 8
typedef unsigned long int uintptr_t;

On 32 bit machine:
-------------------
sizeof(int) = 4
sizeof(long int) = 4
sizeof(long long int) = 8
sizeof(uintptr_t) = 4

sizeof(uintptr_t) == sizeof(unsigned long int) == 4
typedef unsigned int uintptr_t;

> JavaScriptCore/runtime/RegExp.cpp:257
> -	       sprintf(jitAddr, "0x%014lx", (uintptr_t)codeBlock.getAddr());
> +	       sprintf(jitAddr, "%16p", codeBlock.getAddr());

sprintf(jitAddr, "0x%014lx", reinterpret_cast<unsigned long
int>(codeBlock.getAddr()));


More information about the webkit-reviews mailing list