Fix duplicated cookies#564
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08bbdf171a
ℹ️ 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".
| @@ -0,0 +1,17 @@ | |||
| #include "signalCookie.h" | |||
There was a problem hiding this comment.
Add the required Datadog copyright header
This new source file starts directly with #include and has no copyright header, which violates the repository instruction in /workspace/java-profiler/AGENTS.md: “If modifying a file that does not contain Datadog copyright, add one.” Please add the standard Datadog copyright/SPDX header here so the new compilation unit follows the project licensing requirements.
Useful? React with 👍 / 👎.
CI Test ResultsRun: #26666445835 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-05-29 23:14:14 UTC |
jbachorik
left a comment
There was a problem hiding this comment.
Good catch!
I wonder if it is toolchain dependent - we've been compiling this same code in CI for some time with no failures.
Anyway, the fix looks legit, feel free to merge once you fix the copyright header complaint from codex.
What does this PR do?:
Make signal cookie sentinels unique.
Motivation:
The sentinels should be unique, but each compilation unit may get own version - they are no longer unique.
Additional Notes:
Sentinels are defined in header file, every file that includes it having its own copies. Therefore, they are not unique.
How to test the change?:
Compilation failed on ubuntu - complaining multiple definition of the variables. The patch fixes the compilation errors.
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!