mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 10:01:42 +00:00
re-added changes due to svn config setting issues
llvm-svn: 242589
This commit is contained in:
parent
9e85980658
commit
9a5e3922bf
@ -92,6 +92,9 @@ extern "C" {
|
|||||||
Memory will be marked uninitialized, with origin at the call site. */
|
Memory will be marked uninitialized, with origin at the call site. */
|
||||||
void __msan_allocated_memory(const volatile void* data, size_t size);
|
void __msan_allocated_memory(const volatile void* data, size_t size);
|
||||||
|
|
||||||
|
/* Tell MSan about newly destroyed memory. Mark memory as uninitialized. */
|
||||||
|
void __sanitizer_dtor_callback(const volatile void* data, size_t size);
|
||||||
|
|
||||||
/* This function may be optionally provided by user and should return
|
/* This function may be optionally provided by user and should return
|
||||||
a string containing Msan runtime options. See msan_flags.h for details. */
|
a string containing Msan runtime options. See msan_flags.h for details. */
|
||||||
const char* __msan_default_options();
|
const char* __msan_default_options();
|
||||||
|
@ -511,7 +511,7 @@ void __msan_partial_poison(const void* data, void* shadow, uptr size) {
|
|||||||
internal_memcpy((void*)MEM_TO_SHADOW((uptr)data), shadow, size);
|
internal_memcpy((void*)MEM_TO_SHADOW((uptr)data), shadow, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __msan_load_unpoisoned(void *src, uptr size, void *dst) {
|
void __msan_load_unpoisoned(const void *src, uptr size, void *dst) {
|
||||||
internal_memcpy(dst, src, size);
|
internal_memcpy(dst, src, size);
|
||||||
__msan_unpoison(dst, size);
|
__msan_unpoison(dst, size);
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ MSAN_FLAG(bool, poison_heap_with_zeroes, false, "")
|
|||||||
MSAN_FLAG(bool, poison_stack_with_zeroes, false, "")
|
MSAN_FLAG(bool, poison_stack_with_zeroes, false, "")
|
||||||
MSAN_FLAG(bool, poison_in_malloc, true, "")
|
MSAN_FLAG(bool, poison_in_malloc, true, "")
|
||||||
MSAN_FLAG(bool, poison_in_free, true, "")
|
MSAN_FLAG(bool, poison_in_free, true, "")
|
||||||
|
MSAN_FLAG(bool, poison_in_dtor, false, "")
|
||||||
MSAN_FLAG(bool, report_umrs, true, "")
|
MSAN_FLAG(bool, report_umrs, true, "")
|
||||||
MSAN_FLAG(bool, wrap_signals, true, "")
|
MSAN_FLAG(bool, wrap_signals, true, "")
|
||||||
MSAN_FLAG(bool, print_stats, false, "")
|
MSAN_FLAG(bool, print_stats, false, "")
|
||||||
|
@ -1005,6 +1005,14 @@ void __msan_allocated_memory(const void *data, uptr size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __sanitizer_dtor_callback(const void *data, uptr size) {
|
||||||
|
GET_MALLOC_STACK_TRACE;
|
||||||
|
if (flags()->poison_in_dtor) {
|
||||||
|
stack.tag = STACK_TRACE_TAG_POISON;
|
||||||
|
PoisonMemory(data, size, &stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INTERCEPTOR(void *, mmap, void *addr, SIZE_T length, int prot, int flags,
|
INTERCEPTOR(void *, mmap, void *addr, SIZE_T length, int prot, int flags,
|
||||||
int fd, OFF_T offset) {
|
int fd, OFF_T offset) {
|
||||||
if (msan_init_is_running)
|
if (msan_init_is_running)
|
||||||
|
@ -140,6 +140,11 @@ void __msan_partial_poison(const void* data, void* shadow, uptr size);
|
|||||||
SANITIZER_INTERFACE_ATTRIBUTE
|
SANITIZER_INTERFACE_ATTRIBUTE
|
||||||
void __msan_allocated_memory(const void* data, uptr size);
|
void __msan_allocated_memory(const void* data, uptr size);
|
||||||
|
|
||||||
|
// Tell MSan about newly destroyed memory. Memory will be marked
|
||||||
|
// uninitialized.
|
||||||
|
SANITIZER_INTERFACE_ATTRIBUTE
|
||||||
|
void __sanitizer_dtor_callback(const void* data, uptr size);
|
||||||
|
|
||||||
SANITIZER_INTERFACE_ATTRIBUTE
|
SANITIZER_INTERFACE_ATTRIBUTE
|
||||||
u16 __sanitizer_unaligned_load16(const uu16 *p);
|
u16 __sanitizer_unaligned_load16(const uu16 *p);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user