pkgsrc-WIP-changes archive

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

coreclr-git: Introduce CLR_SEM_MAX_NAMELEN



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Apr 24 00:05:40 2016 +0200
Changeset:	c8d56d738044af457a8bb2dc4ac8aba301243835

Modified Files:
	coreclr-git/distinfo
	coreclr-git/patches/patch-src_pal_src_thread_process.cpp

Log Message:
coreclr-git: Introduce CLR_SEM_MAX_NAMELEN

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

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

diffstat:
 coreclr-git/distinfo                               |  2 +-
 .../patches/patch-src_pal_src_thread_process.cpp   | 54 +++++++++++++++++++++-
 2 files changed, 54 insertions(+), 2 deletions(-)

diffs:
diff --git a/coreclr-git/distinfo b/coreclr-git/distinfo
index a50d69e..7dd85f2 100644
--- a/coreclr-git/distinfo
+++ b/coreclr-git/distinfo
@@ -1,3 +1,3 @@
 $NetBSD$
 
-SHA1 (patch-src_pal_src_thread_thread.cpp) = 9d761fdff24305d630d46be621a5baeb93f6ea04
+SHA1 (patch-src_pal_src_thread_process.cpp) = 9c4586f84a7f5b4841998994e2ba95753ee15fa6
diff --git a/coreclr-git/patches/patch-src_pal_src_thread_process.cpp b/coreclr-git/patches/patch-src_pal_src_thread_process.cpp
index 6ab13c9..f6856c6 100644
--- a/coreclr-git/patches/patch-src_pal_src_thread_process.cpp
+++ b/coreclr-git/patches/patch-src_pal_src_thread_process.cpp
@@ -2,7 +2,23 @@ $NetBSD$
 
 --- src/pal/src/thread/process.cpp.orig	2016-04-22 07:58:05.000000000 +0000
 +++ src/pal/src/thread/process.cpp
-@@ -1398,9 +1398,10 @@ static bool IsCoreClrModule(const char* 
+@@ -130,9 +130,14 @@ Volatile<LONG> terminator = 0;
+ // Process ID of this process.
+ DWORD gPID = (DWORD) -1;
+ 
++// The lowest common supported semaphore length, including null character
++// NetBSD-7.99.25: 15 characters
++// MacOSX 10.11: 31
++#define CLR_SEM_MAX_NAMELEN 15
++
+ // The runtime waits on this semaphore if the dbgshim startup semaphore exists
+ Volatile<sem_t *> g_continueSem = SEM_FAILED;
+-char g_continueSemName[NAME_MAX - 4];
++char g_continueSemName[CLR_SEM_MAX_NAMELEN];
+ 
+ // Function to call during PAL/process shutdown/abort
+ Volatile<PSHUTDOWN_CALLBACK> g_shutdownCallback = nullptr;
+@@ -1398,9 +1403,10 @@ static bool IsCoreClrModule(const char* 
  // to clean up its semaphore. 
  // Note to anyone modifying these names in the future: Semaphore names on OS X are limited
  // to SEM_NAME_LEN characters, including null. SEM_NAME_LEN is 31 (at least on OS X 10.11).
@@ -16,3 +32,39 @@ $NetBSD$
  
  class PAL_RuntimeStartupHelper
  {
+@@ -1437,7 +1443,7 @@ public:
+     {
+         if (m_startupSem != SEM_FAILED)
+         {
+-            char startupSemName[NAME_MAX - 4];
++            char startupSemName[CLR_SEM_MAX_NAMELEN];
+             sprintf_s(startupSemName,
+                       sizeof(startupSemName),
+                       RuntimeStartupSemaphoreName,
+@@ -1501,7 +1507,7 @@ public:
+     PAL_ERROR Register()
+     {
+         CPalThread *pThread = InternalGetCurrentThread();
+-        char startupSemName[NAME_MAX - 4];
++        char startupSemName[CLR_SEM_MAX_NAMELEN];
+         PAL_ERROR pe = NO_ERROR;
+ 
+         // See semaphore name format for details about this value. We store it so that
+@@ -1618,7 +1624,7 @@ public:
+ 
+     void StartupHelperThread()
+     {
+-        char continueSemName[NAME_MAX - 4];
++        char continueSemName[CLR_SEM_MAX_NAMELEN];
+         sem_t *continueSem = SEM_FAILED;
+         PAL_ERROR pe = NO_ERROR;
+ 
+@@ -1793,7 +1799,7 @@ BOOL
+ PALAPI
+ PAL_NotifyRuntimeStarted()
+ {
+-    char startupSemName[NAME_MAX - 4];
++    char startupSemName[CLR_SEM_MAX_NAMELEN];
+     sem_t *startupSem = SEM_FAILED;
+     BOOL result = TRUE;
+ 


Home | Main Index | Thread Index | Old Index