pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

coreclr-git: Disable FEATURE_HIJACK



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Feb 7 11:52:07 2016 +0100
Changeset:	9980f71c993e7418ec7d618d488492ad23e1ec2c

Modified Files:
	coreclr-git/distinfo
Added Files:
	coreclr-git/patches/patch-CMakeLists.txt
	coreclr-git/patches/patch-src_pal_src_exception_signal.cpp

Log Message:
coreclr-git: Disable FEATURE_HIJACK

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9980f71c993e7418ec7d618d488492ad23e1ec2c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 coreclr-git/distinfo                               |  2 +
 coreclr-git/patches/patch-CMakeLists.txt           | 16 +++++
 .../patches/patch-src_pal_src_exception_signal.cpp | 72 ++++++++++++++++++++++
 3 files changed, 90 insertions(+)

diffs:
diff --git a/coreclr-git/distinfo b/coreclr-git/distinfo
index a4ac3d2..32dda49 100644
--- a/coreclr-git/distinfo
+++ b/coreclr-git/distinfo
@@ -1,5 +1,7 @@
 $NetBSD$
 
+SHA1 (patch-CMakeLists.txt) = eb442f323c5a8865937df0947eaf2a4306454115
 SHA1 (patch-src_pal_inc_pal__char16.h) = ca743d8330802f1a626b1c335461c733eb2a6325
 SHA1 (patch-src_pal_src_CMakeLists.txt) = 70b48ae972cf214c9e38119f376a6b6c83079fe9
 SHA1 (patch-src_pal_src_configure.cmake) = 3c43cd68dffab48a1ab8a6997a681197ddacaac4
+SHA1 (patch-src_pal_src_exception_signal.cpp) = 201a8c35922643537a1cc4de2e8eddf65c2fab65
diff --git a/coreclr-git/patches/patch-CMakeLists.txt b/coreclr-git/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000..e3f2a2e
--- /dev/null
+++ b/coreclr-git/patches/patch-CMakeLists.txt
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- CMakeLists.txt.orig	2016-02-07 10:36:51.000000000 +0000
++++ CMakeLists.txt
+@@ -694,9 +694,9 @@ if(FEATURE_EVENT_TRACE)
+ endif(FEATURE_EVENT_TRACE)
+ add_definitions(-DFEATURE_EXCEPTIONDISPATCHINFO)
+ add_definitions(-DFEATURE_FRAMEWORK_INTERNAL)
+-if(NOT CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM)
++if(NOT CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+     add_definitions(-DFEATURE_HIJACK)
+-endif(NOT CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM)
++endif(NOT CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+ add_definitions(-DFEATURE_HOST_ASSEMBLY_RESOLVER)
+ add_definitions(-DFEATURE_HOSTED_BINDER)
+ add_definitions(-DFEATURE_ICASTABLE)
diff --git a/coreclr-git/patches/patch-src_pal_src_exception_signal.cpp b/coreclr-git/patches/patch-src_pal_src_exception_signal.cpp
new file mode 100644
index 0000000..be08c9d
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_exception_signal.cpp
@@ -0,0 +1,72 @@
+$NetBSD$
+
+--- src/pal/src/exception/signal.cpp.orig	2016-01-28 19:04:13.000000000 +0000
++++ src/pal/src/exception/signal.cpp
+@@ -45,7 +45,13 @@ using namespace CorUnix;
+ 
+ SET_DEFAULT_DEBUG_CHANNEL(EXCEPT);
+ 
++#ifdef SIGRTMIN
+ #define INJECT_ACTIVATION_SIGNAL SIGRTMIN
++#endif
++
++#if !defined(INJECT_ACTIVATION_SIGNAL) && defined(FEATURE_HIJACK)
++#error FEATURE_HIJACK requires INJECT_ACTIVATION_SIGNAL to be defined
++#endif
+ 
+ /* local type definitions *****************************************************/
+ 
+@@ -70,7 +76,9 @@ static void sigquit_handler(int code, si
+ static void common_signal_handler(PEXCEPTION_POINTERS pointers, int code, 
+                                   native_context_t *ucontext);
+ 
++#ifdef INJECT_ACTIVATION_SIGNAL
+ static void inject_activation_handler(int code, siginfo_t *siginfo, void *context);
++#endif
+ 
+ static void handle_signal(int signal_id, SIGFUNC sigfunc, struct sigaction *previousAction);
+ static void restore_signal(int signal_id, struct sigaction *previousAction);
+@@ -125,7 +133,9 @@ BOOL SEHInitializeSignals()
+     handle_signal(SIGINT, sigint_handler, &g_previous_sigint);
+     handle_signal(SIGQUIT, sigquit_handler, &g_previous_sigquit);
+ 
++#ifdef INJECT_ACTIVATION_SIGNAL
+     handle_signal(INJECT_ACTIVATION_SIGNAL, inject_activation_handler, NULL);
++#endif
+ 
+     /* The default action for SIGPIPE is process termination.
+        Since SIGPIPE can be signaled when trying to write on a socket for which
+@@ -484,6 +494,7 @@ static void sigquit_handler(int code, si
+     kill(gPID, code);
+ }
+ 
++#ifdef INJECT_ACTIVATION_SIGNAL
+ /*++
+ Function :
+     inject_activation_handler
+@@ -523,6 +534,7 @@ static void inject_activation_handler(in
+         }
+     }
+ }
++#endif
+ 
+ /*++
+ Function :
+@@ -538,6 +550,7 @@ Parameters :
+ --*/
+ PAL_ERROR InjectActivationInternal(CorUnix::CPalThread* pThread)
+ {
++#ifdef INJECT_ACTIVATION_SIGNAL
+     int status = pthread_kill(pThread->GetPThreadSelf(), INJECT_ACTIVATION_SIGNAL);
+     if (status != 0)
+     {
+@@ -550,6 +563,9 @@ PAL_ERROR InjectActivationInternal(CorUn
+     }
+ 
+     return NO_ERROR;
++#else
++    return ERROR_CANCELLED;
++#endif
+ }
+ 
+ /*++


Home | Main Index | Thread Index | Old Index