[msan][libcxx] Enable -fsanitize-memory-param-retval
We are considering to make -fsanitize-memory-param-retval enabled by default so probably this patch is unnneded. Reviewed By: #libc, EricWF Differential Revision: https://reviews.llvm.org/D123979
This commit is contained in:
@@ -733,7 +733,7 @@ function(get_sanitizer_flags OUT_VAR USE_SANITIZER)
|
||||
if (USE_SANITIZER STREQUAL "Address")
|
||||
append_flags(SANITIZER_FLAGS "-fsanitize=address")
|
||||
elseif (USE_SANITIZER MATCHES "Memory(WithOrigins)?")
|
||||
append_flags(SANITIZER_FLAGS -fsanitize=memory)
|
||||
append_flags(SANITIZER_FLAGS -fsanitize=memory -fsanitize-memory-param-retval)
|
||||
if (USE_SANITIZER STREQUAL "MemoryWithOrigins")
|
||||
append_flags(SANITIZER_FLAGS "-fsanitize-memory-track-origins")
|
||||
endif()
|
||||
|
||||
@@ -146,9 +146,9 @@ DEFAULT_PARAMETERS = [
|
||||
AddFlag('-fsanitize=address') if sanitizer == 'Address' else None,
|
||||
AddFeature('asan') if sanitizer == 'Address' else None,
|
||||
|
||||
AddFlag('-fsanitize=memory') if sanitizer in ['Memory', 'MemoryWithOrigins'] else None,
|
||||
AddFeature('msan') if sanitizer in ['Memory', 'MemoryWithOrigins'] else None,
|
||||
AddFlag('-fsanitize-memory-track-origins') if sanitizer == 'MemoryWithOrigins' else None,
|
||||
AddFlag('-fsanitize=memory -fsanitize-memory-param-retval') if sanitizer in ['Memory', 'MemoryWithOrigins'] else None,
|
||||
AddFeature('msan') if sanitizer in ['Memory', 'MemoryWithOrigins'] else None,
|
||||
AddFlag('-fsanitize-memory-track-origins') if sanitizer == 'MemoryWithOrigins' else None,
|
||||
|
||||
AddFlag('-fsanitize=thread') if sanitizer == 'Thread' else None,
|
||||
AddFeature('tsan') if sanitizer == 'Thread' else None,
|
||||
|
||||
Reference in New Issue
Block a user