- Timestamp:
- Jun 20, 2018 12:21:30 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r72602 r72625 2930 2930 ifdef VBOX_WITH_GCC_SANITIZER 2931 2931 VBOX_GCC_SANITIZER_FLAGS := \ 2932 -fsanitize=undefined \ 2933 -fsanitize=address \ 2934 -fsanitize=return \ 2935 -fsanitize=bounds \ 2936 -fsanitize=object-size \ 2937 -fno-sanitize=alignment \ 2938 -fno-sanitize=vptr \ 2939 -fno-common \ 2940 -include sanitizer/lsan_interface.h \ 2941 -DVBOX_WITH_GCC_SANITIZER 2932 -fsanitize=undefined \ 2933 -fsanitize=address \ 2934 -fsanitize=return \ 2935 -fsanitize=bounds \ 2936 -fsanitize=object-size \ 2937 -fno-sanitize=alignment \ 2938 -fno-sanitize=vptr \ 2939 -fno-common \ 2940 -include sanitizer/lsan_interface.h \ 2941 -DIPRT_WITH_GCC_SANITIZER \ 2942 -DVBOX_WITH_GCC_SANITIZER 2942 2943 else 2943 2944 VBOX_GCC_SANITIZER_FLAGS = -
trunk/include/iprt/mem.h
r69105 r72625 499 499 */ 500 500 RTDECL(void) RTMemWipeThoroughly(void *pv, size_t cb, size_t cMinPasses) RT_NO_THROW_PROTO; 501 502 503 /** @def RTMEM_WILL_LEAK 504 * Macro for hinting that a memory allocation @a a_pv will leak. 505 * 506 * @note This shall only be used in code that doesn't allocate the object. 507 * Code allocating memory knowing it will leak shall start the allocation 508 * tag string with 'will-leak:'. 509 */ 510 /** @def RTMEM_MAY_LEAK 511 * Macro for hinting that a memory allocation @a a_pv may leak. 512 * 513 * @note This shall only be used in code that doesn't allocate the object. 514 * Code allocating memory knowing it may leak shall start the allocation 515 * tag string with 'may-leak:'. 516 */ 517 #ifdef IPRT_WITH_GCC_SANITIZER 518 # define RTMEM_WILL_LEAK(a_pv) __lsan_ignore_object(a_pv) 519 # define RTMEM_MAY_LEAK(a_pv) __lsan_ignore_object(a_pv) 520 #else 521 # define RTMEM_WILL_LEAK(a_pv) do { } while (0) 522 # define RTMEM_MAY_LEAK(a_pv) do { } while (0) 523 #endif 524 501 525 502 526 #ifdef IN_RING0 -
trunk/src/VBox/Runtime/r3/alloc.cpp
r72613 r72625 86 86 87 87 88 #ifdef VBOX_WITH_GCC_SANITIZER88 #ifdef IPRT_WITH_GCC_SANITIZER 89 89 /** 90 90 * Checks if @a pszTag is a leak tag. … … 118 118 && pszTag[8] == 'k'; 119 119 } 120 #endif /* VBOX_WITH_GCC_SANITIZER */120 #endif /* IPRT_WITH_GCC_SANITIZER */ 121 121 122 122 … … 158 158 , ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 159 159 #endif /* !RTALLOC_USE_EFENCE */ 160 #ifdef VBOX_WITH_GCC_SANITIZER160 #ifdef IPRT_WITH_GCC_SANITIZER 161 161 if (rtMemIsLeakTag(pszTag)) 162 162 __lsan_ignore_object(pv); … … 186 186 , ("pv=%p RTMEM_ALIGNMENT=%#x\n", pv, RTMEM_ALIGNMENT)); 187 187 #endif /* !RTALLOC_USE_EFENCE */ 188 #ifdef VBOX_WITH_GCC_SANITIZER188 #ifdef IPRT_WITH_GCC_SANITIZER 189 189 if (rtMemIsLeakTag(pszTag)) 190 190 __lsan_ignore_object(pv);
Note:
See TracChangeset
for help on using the changeset viewer.