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

Improve zlib defenses on mono #89898

Merged
merged 1 commit into from
Aug 3, 2023
Merged

Improve zlib defenses on mono #89898

merged 1 commit into from
Aug 3, 2023

Conversation

GrabYourPitchforks
Copy link
Member

Improvement to #84604. See also #89532 (comment).

Mono doesn't define the same CMAKE variables as coreclr, so mono was picking up the Unix-style defenses, even when producing a Windows compilation unit. This change allows both mono and coreclr to pick up the same protections.

This pattern is based on the existing file:

if(HOST_WIN32 OR CLR_CMAKE_TARGET_WIN32)
list(APPEND SHARED_DIAGNOSTIC_SERVER_PAL_SOURCES
ds-ipc-pal-namedpipe.c
)
.

- Mono defines HOST_WIN32, not CLR_CMAKE_HOST_WIN32
- Follow same pattern from src\native\eventpipe\CMakeLists.txt
@ghost
Copy link

ghost commented Aug 3, 2023

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

Issue Details

Improvement to #84604. See also #89532 (comment).

Mono doesn't define the same CMAKE variables as coreclr, so mono was picking up the Unix-style defenses, even when producing a Windows compilation unit. This change allows both mono and coreclr to pick up the same protections.

This pattern is based on the existing file:

if(HOST_WIN32 OR CLR_CMAKE_TARGET_WIN32)
list(APPEND SHARED_DIAGNOSTIC_SERVER_PAL_SOURCES
ds-ipc-pal-namedpipe.c
)
.

Author: GrabYourPitchforks
Assignees: -
Labels:

area-System.IO.Compression

Milestone: -

@carlossanlop
Copy link
Member

Tagging @dotnet/runtime-infrastructure - Can folks with cmake knowledge please take a look at this?

@akoeplinger akoeplinger merged commit 22841c5 into main Aug 3, 2023
168 of 170 checks passed
@akoeplinger akoeplinger deleted the levib/zlib-mono branch August 3, 2023 06:38
@ghost ghost locked as resolved and limited conversation to collaborators Sep 2, 2023
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.

5 participants