pkgsrc-WIP-changes archive

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

llvm-netbsd: Restore patch for MemoryTest.cpp



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Jul 20 02:49:10 2017 +0200
Changeset:	877c22cc660918b300f52d581362b3a584e99ba1

Modified Files:
	llvm-netbsd/distinfo
Added Files:
	llvm-netbsd/patches/patch-unittests_Support_MemoryTest.cpp

Log Message:
llvm-netbsd: Restore patch for MemoryTest.cpp

This removes testing RWX pages with regular Memory::allocateMappedMemory.

There are 4 remaining failues in MemoryTest/EnabledWrite tests.
This is under investigation.

Sponsored by <The NetBSD Foundation>

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

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

diffstat:
 llvm-netbsd/distinfo                               |  1 +
 .../patches/patch-unittests_Support_MemoryTest.cpp | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diffs:
diff --git a/llvm-netbsd/distinfo b/llvm-netbsd/distinfo
index e176119211..fcbeb9c6d5 100644
--- a/llvm-netbsd/distinfo
+++ b/llvm-netbsd/distinfo
@@ -20,3 +20,4 @@ SHA1 (patch-lib_Support_Unix_Signals.inc) = 7e3fa55c7e32171454a065c6e38d8189ffdf
 SHA1 (patch-lib_Transforms_Instrumentation_AddressSanitizer.cpp) = 67eee29c4d8525b603e6b7c0a52278bdf3353687
 SHA1 (patch-lib_Transforms_Instrumentation_InstrProfiling.cpp) = 871b474f415d9dc468cc07477101f88d7a20868b
 SHA1 (patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp) = 64fdbb55c77d5f5f73152d2f8daa28adfc428e40
+SHA1 (patch-unittests_Support_MemoryTest.cpp) = 049a278007e8dcb77acb92223d7d6b5d61cb0b48
diff --git a/llvm-netbsd/patches/patch-unittests_Support_MemoryTest.cpp b/llvm-netbsd/patches/patch-unittests_Support_MemoryTest.cpp
new file mode 100644
index 0000000000..24d8d15a81
--- /dev/null
+++ b/llvm-netbsd/patches/patch-unittests_Support_MemoryTest.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- unittests/Support/MemoryTest.cpp.orig	2017-07-05 18:41:47.000000000 +0000
++++ unittests/Support/MemoryTest.cpp
+@@ -33,9 +33,8 @@ protected:
+     case Memory::MF_READ|Memory::MF_WRITE:
+       return Memory::MF_READ|Memory::MF_WRITE;
+     case Memory::MF_READ|Memory::MF_EXEC:
+-    case Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC:
+     case Memory::MF_EXEC:
+-      return Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC;
++      return Memory::MF_READ|Memory::MF_EXEC;
+     }
+     // Default in case values are added to the enum, as required by some compilers
+     return Memory::MF_READ|Memory::MF_WRITE;
+@@ -349,13 +348,13 @@ TEST_P(MappedMemoryTest, UnalignedNear) 
+ 
+ // Note that Memory::MF_WRITE is not supported exclusively across
+ // operating systems and architectures and can imply MF_READ|MF_WRITE
++// RWX mapping is not allowed on all operating systems (W^X restrictions)
+ unsigned MemoryFlags[] = {
+ 			   Memory::MF_READ,
+ 			   Memory::MF_WRITE,
+ 			   Memory::MF_READ|Memory::MF_WRITE,
+ 			   Memory::MF_EXEC,
+-			   Memory::MF_READ|Memory::MF_EXEC,
+-			   Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC
++			   Memory::MF_READ|Memory::MF_EXEC
+ 			 };
+ 
+ INSTANTIATE_TEST_CASE_P(AllocationTests,


Home | Main Index | Thread Index | Old Index