In case of REGEXP_TRACING define is enabled I got the following error during the compile on 32bit platform since -Werror flag is added: cc1plus: warnings being treated as errors ../../../JavaScriptCore/runtime/RegExp.cpp: In member function 'void JSC::RegExp::printTraceData()': ../../../JavaScriptCore/runtime/RegExp.cpp:257: error: format '%014lx' expects type 'long unsigned int', but argument 3 has type 'uintptr_t'
Created attachment 69036 [details] proposed patch
Thanks for looking into this. I have some concerns with %p is that it doesn't include leading zeros and pretty much ignores precision. Did you consider changing the cast to (unsigned long)?
Comment on attachment 69036 [details] proposed patch 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()));
Created attachment 69180 [details] proposed patch v2
Comment on attachment 69180 [details] proposed patch v2 Clearing flags on attachment: 69180 Committed r68639: <http://trac.webkit.org/changeset/68639>
All reviewed patches have been landed. Closing bug.