You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cpu: disable IFUNC with sanitizers, and fail if it's enabled on them.
Since Corrade can be built without -fsanitize= first and then used by
code that has -fsanitize= enabled, there needs to be also a check
directly inside configure.h.
# suggests using __attribute__((no_sanitize_address)), but that doesn't
228
+
# work / can't be used because it would mean marking basically
229
+
# everything including the actual implementation that's being
230
+
# dispatched to.
231
+
#
232
+
# Sanitizers can be also enabled any other way such as with
233
+
# CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER or with per-target properties
234
+
# which isn't easy to detect, so as a secondary measure there's a kill
235
+
# switch in Corrade/configure.h that will fail with an error if a
236
+
# sanitizer is detected and CORRADE_CPU_USE_IFUNC is enabled.
237
+
#
238
+
# While Clang and GCC use -fsanitize=whatever, MSVC allows also
239
+
# /fsanitize=, so catch both.
240
+
if(CMAKE_CXX_FLAGSMATCHES"[-/]fsanitize=")
241
+
if(NOTDEFINED CORRADE_CPU_USE_IFUNC)
242
+
message(WARNING "Disabling CORRADE_CPU_USE_IFUNC by default as it crashes when used together with sanitizers. See https://github.com/google/sanitizers/issues/342 for more information.")
0 commit comments