[Webkit-unassigned] [Bug 166047] Macro expansion producing 'defined' has undefined behavior

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 20 12:42:18 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=166047

--- Comment #2 from Alexey Proskuryakov <ap at webkit.org> ---
Comment on attachment 297493
  --> https://bugs.webkit.org/attachment.cgi?id=297493
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=297493&action=review

> Source/JavaScriptCore/ChangeLog:3
> +        Fix undefined behavior caused by macro expansion producing 'defined'

Another instance of this pattern is in WebKit2/Shared/API/Cocoa/WKFoundation.h

Also, ThirdParty/ANGLE/src/tests/preprocessor_tests appears to test what happens in this scenario.

> Source/JavaScriptCore/runtime/JSGlobalObject.h:302
> -#if JSC_OBJC_API_ENABLED
> +#if JSC_OBJC_API_ENABLED == 1

This is not the normal pattern for how we test for things being enabled, and thus it's error prone. Why was this part of the fix necessary?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161220/b6a127ab/attachment.html>


More information about the webkit-unassigned mailing list