Conversation
CI Test ResultsRun: #27267281494 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Failed Testsmusl-aarch64/debug / 21-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 8-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 25-librcaJob: View logs No detailed failure information available. Check the job logs. musl-aarch64/debug / 11-librcaJob: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 17-graalJob: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 21Job: View logs No detailed failure information available. Check the job logs. musl-aarch64/debug / 25-librcaJob: View logs No detailed failure information available. Check the job logs. musl-aarch64/debug / 17-librcaJob: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 8-j9Job: View logs No detailed failure information available. Check the job logs. musl-aarch64/debug / 8-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 17-librcaJob: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 11-j9Job: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 25-graalJob: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 17Job: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 17-j9Job: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 21-librcaJob: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 21-graalJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 11-librcaJob: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 25-graalJob: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 11Job: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 21-graalJob: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 8-j9Job: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 21Job: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 17-graalJob: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 25Job: View logs No detailed failure information available. Check the job logs. glibc-aarch64/debug / 25Job: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 17Job: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 8-ibmJob: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 11-j9Job: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 8-orclJob: View logs No detailed failure information available. Check the job logs. glibc-amd64/debug / 17-j9Job: View logs No detailed failure information available. Check the job logs. Summary: Total: 32 | Passed: 0 | Failed: 32 Updated: 2026-06-10 09:42:51 UTC |
This comment has been minimized.
This comment has been minimized.
Replaces the stub parseFDE with the full implementation and restores the SFrame-before-DWARF integration in parseDwarfInfo. Includes fixes from sphinx review: OOM handling, fre_off bounds check, cfa_fixed_fp_offset, unsigned loc arithmetic, CFA overflow guard, may_alias annotation, qsort flag guard, and expanded tests.
What does this PR do?:
Completes the SFrame V2 parser that was partially landed in #491 (stub
parseFDEreturningtrue, integration removed fromparseDwarfInfo). This PR replaces the stub with the full implementation and restores the SFrame-before-DWARF fast path.parseDwarfInfo()now checks for a.sframesection first viaPT_GNU_SFRAME. If present and valid, it parses the SFrame data directly into the existingFrameDesc*table and returns. If absent or invalid, it falls back to the existing.eh_frameDWARF path. Walk-time code (StackWalker::walkDwarf(),CodeCache::findFrameDesc()) is completely unchanged.Motivation:
SFrame is a simpler ELF section format that directly encodes CFA/FP/RA offsets in flat, binary-searchable tables without requiring a DWARF CFI bytecode interpreter. On modern Linux distros (Fedora 43+, glibc 2.42+, binutils 2.40+), libraries ship
.sframesections alongside.eh_frame. Parsing SFrame is faster than interpreting DWARF opcodes at library load time.Additional Notes:
PT_GNU_SFRAMEis never found on Mach-O).SFrameParseris self-contained (sframe.h/sframe.cpp), depends only ondwarf.h.addRecord,fde->fre_offpre-check before pointer arithmetic,cfa_fixed_fp_offsetapplied symmetrically withcfa_fixed_ra_offset, unsignedlocarithmetic, CFA 24-bit overflow guard matchingDwarfParser,may_aliasannotation on packed structs,qsortskipped whenSFRAME_F_FDE_SORTEDis set.How to test the change?:
sframe_ut.cppcovering: header validation, FDE loop (empty/PCMASK/empty-FRE skip), FRE parsing (SP/FP-based CFA, fixed/per-FRE RA, leaf functions), offset encodings (1B, 2B, 4B), multiple FDEs with sort verification (including reverse-order input), address translation with non-zerosection_offset, FRE bounds overrun recovery, destructor memory safety, aarch64 default frame detection,auxhdr_lenpositive path, reserved encoding rejection, and individual bounds guard coverage../gradlew :ddprof-lib:gtestDebug— all SFrame tests pass, existing DWARF tests unaffected../gradlew ddprof-lib:compileRelease— builds on both Linux and macOS.cstack=dwarf, verify native stacks are collected via the SFrame path.For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!