Skip to content

Fix entry resolution for main(String[]) method - #740

Merged
zhengyu123 merged 2 commits into
mainfrom
zgu/entry_sig
Aug 18, 2026
Merged

Fix entry resolution for main(String[]) method#740
zhengyu123 merged 2 commits into
mainfrom
zgu/entry_sig

Conversation

@zhengyu123

@zhengyu123 zhengyu123 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?:
Fix a logic error in resolving main(String[]) entry frame.

Motivation:
Bug fix.

Additional Notes:

How to test the change?:
Regular CI

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 security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: PROF-15781

Unsure? Have a question? Request a review!

@dd-octo-sts

dd-octo-sts Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmzvulz
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Mon Aug 17 17:44:13 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Logic error
Dereference of null pointer1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorDereference of null pointerprofiler.hfindLibraryByAddress52328

@dd-octo-sts

dd-octo-sts Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 777cc2c1

@datadog-official

datadog-official Bot commented Aug 17, 2026

Copy link
Copy Markdown

Tests

🔄 Datadog auto-retried 2 jobs - 1 passed on retry View in Datadog

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 777cc2c | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #32051499171 | Commit: 08f2da3 | Duration: 15m 6s (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-08-17 17:59:53 UTC

@zhengyu123
zhengyu123 marked this pull request as ready for review August 17, 2026 16:58
@zhengyu123
zhengyu123 requested a review from a team as a code owner August 17, 2026 16:58

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

Copy link
Copy Markdown

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: 03c8d05836

ℹ️ 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".

Comment thread ddprof-lib/src/main/cpp/flightRecorder.cpp Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

strncmp(method_sig, "([Ljava/lang/String;)V", 22) == 0) {

P2 Badge Add regression coverage for main entry detection

Because this commit is a bug fix to the predicate that decides whether a main(String[]) root frame is emitted as non-truncated, the production-only change leaves CI with no failing-before/passing-after check for the descriptor regression that was just fixed. Please add a Java or gtest regression that captures/resolves a public static void main(String[]) frame and asserts the resulting stack trace is treated as an entry frame rather than truncated.

AGENTS.md reference: AGENTS.md:L438-L439

ℹ️ 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".

@zhengyu123

Copy link
Copy Markdown
Contributor Author

A comprehensive test is indeed needed to verify all entry points, but should be done in separate PR.

@jbachorik jbachorik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@zhengyu123
zhengyu123 merged commit e8166e3 into main Aug 18, 2026
108 of 111 checks passed
@zhengyu123
zhengyu123 deleted the zgu/entry_sig branch August 18, 2026 12:45
@github-actions github-actions Bot added this to the 1.50.0 milestone Aug 18, 2026
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.

3 participants