Repository navigation
fix: avoid UB left shift of negative ADRP immediate in decodeAdrTarget - #848
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 803e1edd5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
CI Test ResultsRun: #37919030165 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 76 | Passed: 76 | Failed: 0 Updated: 2026-10-09 11:07:08 UTC |
Reliability & Chaos Results✅ All reliability & chaos checks passed Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/143670108 |
Summary
decodeAdrTarget()left-shifts the sign-extended ADRP immediate (imm << 12), which is undefined behavior whenimmis negative (ADRP addresses pages in either direction relative to PC)VM::initProfilerBridge->JvmtiEnv::GenerateEvents->analyzeStubUnwind, aborting the process almost immediately (checks are compiled non-recoverable via-fno-sanitize-recover=all)uint64_tbefore shifting, matching the existingattributionPCpattern in this codebase for the same UB class -- two's-complement wraparound produces an identical bit pattern, just well-definedTest plan
gtestAsan/testAsanon aarch64 no longer aborts with the UBSan left-shift error