Skip to content

Commit

Permalink
enable GS Cookie on OSX (#39143)
Browse files Browse the repository at this point in the history
* enable GS Cookie on OSX

* Actual fix
  • Loading branch information
VSadov authored Jul 13, 2020
1 parent 7b2e585 commit 371ae3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions src/coreclr/src/vm/ceemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,6 @@ void InitGSCookie()
}
CONTRACTL_END;

#if defined(TARGET_OSX) && defined(CORECLR_EMBEDDED)
// OSX does not like the way we change section protection when running in a superhost bundle
// disabling this for now
// https://github.com/dotnet/runtime/issues/38184
return;
#endif

volatile GSCookie * pGSCookiePtr = GetProcessGSCookiePtr();

#ifdef TARGET_UNIX
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/vm/vars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ typedef DPTR(GSCookie) PTR_GSCookie;
#define READONLY_ATTR
#else
#ifdef __APPLE__
#define READONLY_ATTR_ARGS section("__TEXT,__const")
#define READONLY_ATTR_ARGS section("__DATA,__const")
#else
#define READONLY_ATTR_ARGS section(".rodata")
#endif
Expand Down

0 comments on commit 371ae3c

Please sign in to comment.