Skip to content

Fix duplicated cookies#564

Open
zhengyu123 wants to merge 1 commit into
mainfrom
zgu/signalcookie
Open

Fix duplicated cookies#564
zhengyu123 wants to merge 1 commit into
mainfrom
zgu/signalcookie

Conversation

@zhengyu123
Copy link
Copy Markdown
Contributor

@zhengyu123 zhengyu123 commented May 29, 2026

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:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: PROF-14835

Unsure? Have a question? Request a review!

@zhengyu123 zhengyu123 requested a review from a team as a code owner May 29, 2026 22:57
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 29, 2026

CI Test Results

Run: #26666445835 | Commit: 2731bc0 | Duration: 12m 10s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-05-29 23:14:14 UTC

Copy link
Copy Markdown
Collaborator

@jbachorik jbachorik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants