Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make startup hooks kind of work with native AOT #96894

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

MichalStrehovsky
Copy link
Member

Fixes #96052.

Since we compile startup hooks anyway, just add a call to it. It will be deadcoded by default. Can be enabled and then it will at least work for hooks that were part of the app. It will throw PNSE for random file paths.

Cc @dotnet/ilc-contrib

Fixes dotnet#96052.

Since we compile startup hooks anyway, just add a call to it. It will be deadcoded by default. Can be enabled and then it will at least work for hooks that were part of the app. It will throw PNSE for random file paths.
@ghost
Copy link

ghost commented Jan 12, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #96052.

Since we compile startup hooks anyway, just add a call to it. It will be deadcoded by default. Can be enabled and then it will at least work for hooks that were part of the app. It will throw PNSE for random file paths.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@ivanpovazan
Copy link
Member

cc: @lambdageek

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@agocke
Copy link
Member

agocke commented Jan 12, 2024

Should we add a smoke test for this?

@MichalStrehovsky
Copy link
Member Author

Filed #97020 on the System.IO test.

And the System.Text.Json test is not actionable because no dump:

----- end Mon Jan 15 01:12:38 PST 2024 ----- exit code 137 ----------------------------------------------------------
exit code 137 means SIGKILL Killed eg by kill
ulimit -c value: 0
Unable to obtain kernel buffer: Operation not permitted
usage: sudo dmesg
----- start =============== XUnitLogChecker Output =====================================================
No dumps found in /cores.

@MichalStrehovsky MichalStrehovsky merged commit e42a873 into dotnet:main Jan 16, 2024
170 of 179 checks passed
@MichalStrehovsky MichalStrehovsky deleted the fix96052 branch January 16, 2024 10:16
@jkotas
Copy link
Member

jkotas commented Jan 16, 2024

And the System.Text.Json test is not actionable because no dump:

This seems to be happening quite frequently in the CI. I have opened #97049 to have it tracked.

tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
Fixes dotnet#96052.

Since we compile startup hooks anyway, just add a call to it. It will be deadcoded by default. Can be enabled and then it will at least work for hooks that were part of the app. It will throw PNSE for random file paths.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NativeAOT doesn't produce a warning if StartupHookSupport is enabled
4 participants