diff --git a/src/agent/libclusterfuzz/src/generated.rs b/src/agent/libclusterfuzz/src/generated.rs index 4dc9a3ae93..509c07cede 100644 --- a/src/agent/libclusterfuzz/src/generated.rs +++ b/src/agent/libclusterfuzz/src/generated.rs @@ -26,6 +26,8 @@ pub const STACK_FRAME_IGNORE_REGEXES: &[&str] = &[ r"^pthread_kill$", r"^raise$", r"^tgkill$", + r"^__chk_fail$", + r"^__fortify_fail$", r"^(|__)aeabi_", r"^(|__)memcmp", r"^(|__)memcpy", @@ -201,4 +203,8 @@ pub const STACK_FRAME_IGNORE_REGEXES: &[&str] = &[ r"^syslog::LogMessage", r"^print_address_description", r"^_etext", + r".*libc\.so", + r".*libc\+\+\.so", + r".*libc\+\+_shared\.so", + r".*libstdc\+\+\.so", ]; diff --git a/src/agent/libclusterfuzz/src/lib.rs b/src/agent/libclusterfuzz/src/lib.rs index 3999e21050..6c9d652f84 100644 --- a/src/agent/libclusterfuzz/src/lib.rs +++ b/src/agent/libclusterfuzz/src/lib.rs @@ -43,5 +43,6 @@ mod tests { fn test_stack_filter() { assert!(get_stack_filter().is_match("abort")); assert!(!get_stack_filter().is_match("ContosoSaysHi")); + assert!(get_stack_filter().is_match("libc.so")); } } diff --git a/src/agent/libclusterfuzz/third-party/build.py b/src/agent/libclusterfuzz/third-party/build.py index 6098a5ef38..662a0b7307 100644 --- a/src/agent/libclusterfuzz/third-party/build.py +++ b/src/agent/libclusterfuzz/third-party/build.py @@ -51,9 +51,11 @@ data[name] = entry for_rust = { - "STACK_FRAME_IGNORE_REGEXES": [ - f'r"{x}"' for x in data["STACK_FRAME_IGNORE_REGEXES"] - ], + # since we always assume symbolication, combine these + "STACK_FRAME_IGNORE_REGEXES": ( + [f'r"{x}"' for x in data["STACK_FRAME_IGNORE_REGEXES"]] + + [f'r"{x}"' for x in data["STACK_FRAME_IGNORE_REGEXES_IF_SYMBOLIZED"]] + ), } with open("../src/generated.rs", "w") as handle: @@ -66,4 +68,4 @@ value = for_rust[key] handle.write(f"pub const {key}: &str = {value};") else: - raise Exception('unsupported for_rust type') + raise Exception("unsupported for_rust type")