Title: [276129] trunk
Revision
276129
Author
[email protected]
Date
2021-04-16 02:43:04 -0700 (Fri, 16 Apr 2021)

Log Message

[CMake] UBSan build fixes
https://bugs.webkit.org/show_bug.cgi?id=224536

Patch by Philippe Normand <[email protected]> on 2021-04-16
Reviewed by Adrian Perez de Castro.

Synchronize UBSan compiler flags with the ones defined in ubsan.xcconfig.

* Source/cmake/WebKitCompilerFlags.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (276128 => 276129)


--- trunk/ChangeLog	2021-04-16 09:04:23 UTC (rev 276128)
+++ trunk/ChangeLog	2021-04-16 09:43:04 UTC (rev 276129)
@@ -1,3 +1,14 @@
+2021-04-16  Philippe Normand  <[email protected]>
+
+        [CMake] UBSan build fixes
+        https://bugs.webkit.org/show_bug.cgi?id=224536
+
+        Reviewed by Adrian Perez de Castro.
+
+        Synchronize UBSan compiler flags with the ones defined in ubsan.xcconfig.
+
+        * Source/cmake/WebKitCompilerFlags.cmake:
+
 2021-04-15  Don Olmstead  <[email protected]>
 
         ANGLE is only being built when WebGL is enabled

Modified: trunk/Source/cmake/WebKitCompilerFlags.cmake (276128 => 276129)


--- trunk/Source/cmake/WebKitCompilerFlags.cmake	2021-04-16 09:04:23 UTC (rev 276128)
+++ trunk/Source/cmake/WebKitCompilerFlags.cmake	2021-04-16 09:43:04 UTC (rev 276129)
@@ -201,9 +201,10 @@
                 set(SANITIZER_LINK_FLAGS "-fsanitize=address ${SANITIZER_LINK_FLAGS}")
 
             elseif (${SANITIZER} MATCHES "undefined")
-                WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS("-fno-omit-frame-pointer -fno-optimize-sibling-calls")
-                # -fsanitize=vptr is incompatible with -fno-rtti
-                set(SANITIZER_COMPILER_FLAGS "-fsanitize=undefined -frtti ${SANITIZER_COMPILER_FLAGS}")
+                # Please keep these options synchronized with Tools/sanitizer/ubsan.xcconfig
+                WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS("-fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-optimize-sibling-calls")
+                # -fsanitize=vptr is disabled because incompatible with -fno-rtti
+                set(SANITIZER_COMPILER_FLAGS "-fsanitize=undefined -fno-sanitize=vptr ${SANITIZER_COMPILER_FLAGS}")
                 set(SANITIZER_LINK_FLAGS "-fsanitize=undefined ${SANITIZER_LINK_FLAGS}")
 
             elseif (${SANITIZER} MATCHES "thread" AND NOT MSVC)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to