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

Enable MHR support on OSX #26193

Merged
merged 3 commits into from
Aug 16, 2019
Merged

Enable MHR support on OSX #26193

merged 3 commits into from
Aug 16, 2019

Conversation

janvorli
Copy link
Member

  • Move JIT_WriteBarrier that is modified at runtime to a dynamically
    allocated memory instead of making a page in libcoreclr.dylib RWX.
  • Fix JIT_Stelem_Ref calls to JIT_WriteBarrier
  • Update PAL to add MEM_JIT flag for allocations and reservations of
    executable memory.
  • Update native runtime in EH and stack unwinding areas so that it can
    unwind from the write barrier copy. That code has no unwind info, so
    without special handling, runtime would not be able to unwind from
    it.

* Move JIT_WriteBarrier that is modified at runtime to a dynamically
  allocated memory instead of making a page in libcoreclr.dylib RWX.

* Update PAL to add MEM_JIT flag for allocations and reservations of
  executable memory.

* Update native runtime in EH and stack unwinding areas so that it can
  unwind from the write barrier copy. That code has no unwind info, so
  without special handling, runtime would not be able to unwind from
  it.
@janvorli janvorli added this to the 5.0 milestone Aug 15, 2019
@janvorli janvorli requested a review from jkotas August 15, 2019 21:13
@janvorli janvorli self-assigned this Aug 15, 2019
@janvorli
Copy link
Member Author

@jkotas - this PR contains all the stuff you have already reviewed and that I've reverted in the past due to the missing JIT_Stelem_Ref changes. And in addition, it fixes the JIT_Stelem_Ref to correctly jump to the copy of the JIT_WriteBarrier code instead of the readonly original in the binary.

@janvorli
Copy link
Member Author

cc: @odhanson

@janvorli janvorli merged commit 0e64ecf into dotnet:master Aug 16, 2019
@janvorli janvorli deleted the add-mhr-support-2 branch August 16, 2019 17:45
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Enable MHR support on OSX

* Move JIT_WriteBarrier that is modified at runtime to a dynamically
  allocated memory instead of making a page in libcoreclr.dylib RWX.

* Update PAL to add MEM_JIT flag for allocations and reservations of
  executable memory.

* Update native runtime in EH and stack unwinding areas so that it can
  unwind from the write barrier copy. That code has no unwind info, so
  without special handling, runtime would not be able to unwind from
  it.

* Fix JIT_Stelem_Ref calls to JIT_WriteBarrier


Commit migrated from dotnet/coreclr@0e64ecf
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.

2 participants