path: root/dac.cmake
diff options
authorMike McLaughlin <>2018-08-06 12:16:49 -0700
committerGitHub <>2018-08-06 12:16:49 -0700
commit5306f704e8b4bb30315313033880c36adca6e7f0 (patch)
tree1b4d888150a3342129a402e9aaaf151e6c85a87f /dac.cmake
parent3b9b7b6edf77819f6b9670b0857d8757e95e9fb0 (diff)
Only register signals and create alt exception stack in coreclr. (#19309)
There was a couple of places where the DAC (IsValidObject, GetAppDomainForObject) assumed that a NULL target/debuggee address would throw an exception that would be caught by try/catch. Any other invalid address is handled with a software exception throwed by the read memory functions. In general it is a better overall design not to have any of the DBI/DAC, etc. code depend on hardware exceptions being caught. On Linux the C++ runtime sometimes can't handle it. There is a slight risk that there are other places in the DAC that make the NULL address assumption but testing so far has found any. Added PAL_SetInitializeDLLFlags as a fallback to allow the PAL_InitializeDLL flags to be set for a PAL instance for the DAC where we could still register h/w signals but not the altstack switching to reduce this risk. The flags can't be build time conditional because we only build one coreclrpal.a library that all the modules used. Having a PAL_InitializeFlags function doesn't really help either because of the PAL_RegisterModule call to PAL_IntializeDLL and the LoadLibrary dance/protocol that uses it to call the loading module's DLLMain. Add PAL_SetInitializeFlags; remove flags from PAL_INITIALIZE and PAL_INITIALIZE_DLL default. Add PAL_InitializeFlags() to allowing the default to be overriden.
Diffstat (limited to 'dac.cmake')
1 files changed, 0 insertions, 1 deletions
diff --git a/dac.cmake b/dac.cmake
index 8813efd55d..62628cbbe0 100644
--- a/dac.cmake
+++ b/dac.cmake
@@ -1,7 +1,6 @@
# Contains the dac build specific definitions. Included by the leaf dac cmake files.