diff options
| author | 2026-09-28 02:02:24 +0100 | |
|---|---|---|
| committer | 2026-09-30 14:09:15 -0300 | |
| commit | 0b0752e8a493634915e16456df609c08c0595e85 (patch) | |
| tree | e57f471e26c8bb7c33a472b99830f08ea007d544 /scripts | |
| parent | perf test demangle: Fail when demangling fails (diff) | |
perf symbol: Don't return an unterminated Rust demangle buffer
When dso__demangle_sym() runs out of retries or fails to grow the
output buffer for a Rust v0 symbol, it returns the buffer and callers
blindly use it as the demangled symbol name. However,
rust_demangle_display_demangle() doesn't NUL terminate its output when
it reports OverflowOverflow, so the buffer isn't a string.
Free the buffer and return NULL in both cases. Callers already fall back
to the mangled name when no demangled name is returned.
Fixes: e20848c317b51e74 ("perf symbol-elf: Integrate rust-v0 demangling")
Reviewed-by: Ian Rogers <irogers@google.com>
Assisted-by: LLM
Signed-off-by: Michal Pluta <michalpl2003@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
