Skip to content

Commit e68c265

Browse files
authored
[scudo] Add parameters for ring buffer and stack depot sizes (#74539)
These will be used in follow-up CLs, committing this separately because it needs a matching change in AOSP. This way we can avoid complicated multi-repo rollbacks if something is wrong with the follow up CLs.
1 parent 68db7ae commit e68c265

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

compiler-rt/lib/scudo/standalone/include/scudo/interface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
7272
// pointer.
7373
void __scudo_get_error_info(struct scudo_error_info *error_info,
7474
uintptr_t fault_addr, const char *stack_depot,
75-
const char *region_info, const char *ring_buffer,
75+
size_t stack_depot_size, const char *region_info,
76+
const char *ring_buffer, size_t ring_buffer_size,
7677
const char *memory, const char *memory_tags,
7778
uintptr_t memory_addr, size_t memory_size);
7879

compiler-rt/lib/scudo/standalone/wrappers_c_bionic.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ static scudo::Allocator<scudo::Config, SCUDO_PREFIX(malloc_postinit)>
3838
// TODO(kostyak): support both allocators.
3939
INTERFACE void __scudo_print_stats(void) { Allocator.printStats(); }
4040

41-
INTERFACE void
42-
__scudo_get_error_info(struct scudo_error_info *error_info,
43-
uintptr_t fault_addr, const char *stack_depot,
44-
const char *region_info, const char *ring_buffer,
45-
const char *memory, const char *memory_tags,
46-
uintptr_t memory_addr, size_t memory_size) {
41+
INTERFACE void __scudo_get_error_info(
42+
struct scudo_error_info *error_info, uintptr_t fault_addr,
43+
const char *stack_depot, size_t stack_depot_size, const char *region_info,
44+
const char *ring_buffer, size_t ring_buffer_size, const char *memory,
45+
const char *memory_tags, uintptr_t memory_addr, size_t memory_size) {
46+
(void)(stack_depot_size);
47+
(void)(ring_buffer_size);
4748
Allocator.getErrorInfo(error_info, fault_addr, stack_depot, region_info,
4849
ring_buffer, memory, memory_tags, memory_addr,
4950
memory_size);

0 commit comments

Comments
 (0)