Skip to content

[nativeaot] Disable FEATURE_READOLY_GS_COOKIE on macOS - #99173

Merged
jkotas merged 2 commits into
dotnet:mainfrom
lambdageek:nativeaot-disable-readonly_gs_cookie
Mar 1, 2024
Merged

jkotas merged 2 commits into
dotnet:mainfrom
lambdageek:nativeaot-disable-readonly_gs_cookie

Conversation

@lambdageek

Copy link
Copy Markdown
Member

It's already disabled on ios, tvos and catalyst.

Fixes #99172

It's already disabled on ios, tvos and catalyst.

Fixes dotnet#99172
@ghost

ghost commented Mar 1, 2024

Copy link
Copy Markdown

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

Issue Details

It's already disabled on ios, tvos and catalyst.

Fixes #99172

Author: lambdageek
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@am11
am11 requested a review from filipnavara March 1, 2024 19:30
Comment thread src/coreclr/nativeaot/Runtime/CMakeLists.txt Outdated
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
@filipnavara

filipnavara commented Mar 1, 2024 •

Copy link
Copy Markdown
Member

This is not going to make things worse, so let’s make the change. That said, are we supposed to mess with the value of __security_cookie as a shared library? I thought it’s per process and this feels weird. I am no expert though, so I would be happy to hear some explanation why is it fine.

@lambdageek

Copy link
Copy Markdown
Member Author

That said, are we supposed to mess with the value of __security_cookie as a shared library? I thought it’s a per process and this feels weird.

In a NativeAOT shared library __security_cookie ends up as a private symbol in __DATA_CONST,__const (the source code says __DATA,__const but OSX ld helpfully moves that segment to __DATA_CONST,__const - see Xcode11 Release Notes). And ILCompiler directly references it from the generated code.

If you have multiple NativeAOT libraries in a process, they each have their own cookie.

@jkotas
jkotas merged commit 33bf01f into dotnet:main Mar 1, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 1, 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][osx-arm64] Crash when loading shared library as an LLDB plugin

4 participants