pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Mon Jun 25 13:31:11 UTC 2018

Modified Files:
        pkgsrc/lang/rust: distinfo
Added Files:
        pkgsrc/lang/rust/patches: patch-src_libstd_sys_unix_thread.rs

Log Message:
Add missing patch to fix build on NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/lang/rust/distinfo
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/lang/rust/patches/patch-src_libstd_sys_unix_thread.rs

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

Modified files:

Index: pkgsrc/lang/rust/distinfo
diff -u pkgsrc/lang/rust/distinfo:1.27 pkgsrc/lang/rust/distinfo:1.28
--- pkgsrc/lang/rust/distinfo:1.27      Sun Jun 24 08:05:25 2018
+++ pkgsrc/lang/rust/distinfo   Mon Jun 25 13:31:11 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2018/06/24 08:05:25 ryoon Exp $
+$NetBSD: distinfo,v 1.28 2018/06/25 13:31:11 ryoon Exp $
 
 SHA1 (rust-1.26.2-i686-apple-darwin.tar.gz) = 7a353c1875f4656e95a14ec4822c3c2a408d1d26
 RMD160 (rust-1.26.2-i686-apple-darwin.tar.gz) = 9377bd2f7373c5cf7b7e936e51d2749bea8f687f
@@ -76,6 +76,7 @@ SHA1 (patch-src_bootstrap_bin_rustc.rs) 
 SHA1 (patch-src_bootstrap_lib.rs) = d86e173b931099730a4f18d044d7977c89f87b91
 SHA1 (patch-src_libbacktrace_configure) = b2c1e9b93a99408aad42ab9f1af27704cc81bdd8
 SHA1 (patch-src_libstd_build.rs) = 32dad8a474300f9f37bce8b92acca762cf8cc4ab
+SHA1 (patch-src_libstd_sys_unix_thread.rs) = 2a0b7ea8e7e09623826f306f9f1d0611799173d4
 SHA1 (patch-src_llvm_CMakeLists.txt) = ffdf4337fdc84d8314c97c4e492e6b84244a99d1
 SHA1 (patch-src_llvm_cmake_modules_AddLLVM.cmake) = 282d97cce8d01cfefe565185d4999c2db9ccc13f
 SHA1 (patch-src_llvm_include_llvm_Support_DataTypes.h.cmake) = 61cba4480d97e740d361708eb8e5c9b13bb2d36e

Added files:

Index: pkgsrc/lang/rust/patches/patch-src_libstd_sys_unix_thread.rs
diff -u /dev/null pkgsrc/lang/rust/patches/patch-src_libstd_sys_unix_thread.rs:1.3
--- /dev/null   Mon Jun 25 13:31:11 2018
+++ pkgsrc/lang/rust/patches/patch-src_libstd_sys_unix_thread.rs        Mon Jun 25 13:31:11 2018
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_libstd_sys_unix_thread.rs,v 1.3 2018/06/25 13:31:11 ryoon Exp $
+
+--- src/libstd/sys/unix/thread.rs.orig 2018-06-24 22:42:29.203295357 +0000
++++ src/libstd/sys/unix/thread.rs
+@@ -326,13 +326,22 @@ pub mod guard {
+             // Reallocate the last page of the stack.
+             // This ensures SIGBUS will be raised on
+             // stack overflow.
+-            let result = mmap(stackaddr, PAGE_SIZE, PROT_NONE,
++            // Systems which enforce strict PAX MPROTECT do not allow
++            // to mprotect() a mapping with less restrictive permissions
++            // than the initial mmap() used, so we mmap() here with
++            // read/write permissions and only then mprotect() it to
++            // no permissions at all. See issue #50313.
++            let result = mmap(stackaddr, PAGE_SIZE, PROT_READ | PROT_WRITE,
+                               MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
+-
+             if result != stackaddr || result == MAP_FAILED {
+                 panic!("failed to allocate a guard page");
+             }
+ 
++            let result = mprotect(stackaddr, PAGE_SIZE, PROT_NONE);
++            if result != 0 {
++                panic!("failed to protect the guard page");
++            }
++
+             let guardaddr = stackaddr as usize;
+             let offset = if cfg!(target_os = "freebsd") {
+                 2



Home | Main Index | Thread Index | Old Index