Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

Djuffin
Copy link

@Djuffin Djuffin commented Nov 5, 2015

DebuggerHeap is a common class that is used for both executable and
non-executable memory allocations by debugging infrustructure.
On Windows, OS supports concept of executable heap and CLR doesn't need
to do anything extra for each executable allocation. On Linux/OSX
this is not true. That's why this changes preserves fExecutable flag for each heap
and makes sure that we mark memory as executable only when it is necessary.

This change should address performance degradation described in #711.
It doesn't fix managed debugging on CentoOS, but allows to run CoreCLR processes there without constant SELinux warnings.

DebuggerHeap is a common class that is used for both executable and
non-executable memory allocations by debugging infrustructure.
On Windows, OS supports concept of executable heap and CLR doesn't need
to do anything extra for each executable allocation. On Linux/OSX
this is not true. That's why this changes preserves fExecutable flag for each heap
and makes sure that we mark memory as executable only when it is necessary.
@mikem8361
Copy link

LGTM

@pgavlin
Copy link

pgavlin commented Nov 5, 2015

LGTM as well. This looks like it should ameliorate things until we can get the root cause fixed. Thanks!

@sergiy-k
Copy link

sergiy-k commented Nov 5, 2015

LGTM. Thank you!

Copy link
Member

Choose a reason for hiding this comment

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

Should this (and the other uses) be under FEATURE_PAL as well?

Copy link
Author

Choose a reason for hiding this comment

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

It can be, but I don't see a reason to complicate things.

@adityamandaleeka
Copy link
Member

LGTM

Chrisboh added a commit that referenced this pull request Nov 5, 2015
Restrict allocation of executable memory by DebuggerHeap
@Chrisboh Chrisboh merged commit 1b06b0e into dotnet:master Nov 5, 2015
@Chrisboh
Copy link
Member

Chrisboh commented Nov 5, 2015

@Djuffin Is there a plan to bring this in for RC1?

@Djuffin
Copy link
Author

Djuffin commented Nov 5, 2015

@Chrisboh Yes. rc1 is the real reason we're doing this.

@Chrisboh
Copy link
Member

Chrisboh commented Nov 5, 2015

/cc @tzwlai

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Restrict allocation of executable memory by DebuggerHeap

Commit migrated from dotnet/coreclr@1b06b0e
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants