svn commit: r445553 - in branches/2017Q3/emulators/rpcs3: . files
Jan Beich
jbeich at FreeBSD.org
Wed Jul 12 00:09:47 UTC 2017
Author: jbeich
Date: Wed Jul 12 00:09:46 2017
New Revision: 445553
URL: https://svnweb.freebsd.org/changeset/ports/445553
Log:
MFH: r445552
emulators/rpcs3: work around LLVM recompiler crash
Assertion failed: ((Type == ELF::R_X86_64_32 && (Value <= UINT32_MAX)) || (Type == ELF::R_X86_64_32S && ((int64_t)Value <= INT32_MAX && (int64_t)Value >= INT32_MIN))), function resolveX86_64Relocation, file /usr/ports/devel/llvm40/work/llvm-4.0.1.src/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp, line 287.
Approved by: ports-secteam blanket
Added:
branches/2017Q3/emulators/rpcs3/files/patch-Utilities_JIT.cpp
- copied unchanged from r445552, head/emulators/rpcs3/files/patch-Utilities_JIT.cpp
Modified:
branches/2017Q3/emulators/rpcs3/Makefile
Directory Properties:
branches/2017Q3/ (props changed)
Modified: branches/2017Q3/emulators/rpcs3/Makefile
==============================================================================
--- branches/2017Q3/emulators/rpcs3/Makefile Wed Jul 12 00:08:24 2017 (r445552)
+++ branches/2017Q3/emulators/rpcs3/Makefile Wed Jul 12 00:09:46 2017 (r445553)
@@ -4,6 +4,7 @@ PORTNAME= rpcs3
DISTVERSIONPREFIX= v
DISTVERSION= 0.0.2-423
DISTVERSIONSUFFIX= -g34709eb3
+PORTREVISION= 1
CATEGORIES= emulators
MAINTAINER= jbeich at FreeBSD.org
Copied: branches/2017Q3/emulators/rpcs3/files/patch-Utilities_JIT.cpp (from r445552, head/emulators/rpcs3/files/patch-Utilities_JIT.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2017Q3/emulators/rpcs3/files/patch-Utilities_JIT.cpp Wed Jul 12 00:09:46 2017 (r445553, copy of r445552, head/emulators/rpcs3/files/patch-Utilities_JIT.cpp)
@@ -0,0 +1,35 @@
+--- Utilities/JIT.cpp.orig 2017-07-10 15:42:02 UTC
++++ Utilities/JIT.cpp
+@@ -31,6 +31,10 @@
+ #include <Windows.h>
+ #endif
+
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#include <sys/resource.h>
++#endif
++
+ #include "JIT.h"
+
+ // Memory manager mutex
+@@ -45,6 +49,21 @@ static void* const s_memory = []() -> void*
+ llvm::InitializeNativeTarget();
+ llvm::InitializeNativeTargetAsmPrinter();
+ LLVMLinkInMCJIT();
++
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++ // XXX Fix maximum data segment size (data + BSS + heap) to 256 MB.
++ // This allows avoiding calling mmap(2) with MAP_FIXED.
++ // On FreeBSD, without lowering this limit, calling mmap(2)
++ // without MAP_FIXED will result in getting an address just
++ // beyond maximum data segment size which will be far beyond
++ // the desired 2 GB.
++ struct rlimit limit;
++ limit.rlim_cur = 0x10000000; // 256 MB
++ limit.rlim_max = 0x10000000;
++ if(setrlimit(RLIMIT_DATA, &limit) != 0) {
++ LOG_ERROR(GENERAL, "LLVM: Failed to lower maximum data segment size");
++ }
++#endif
+
+ for (u64 addr = 0x10000000; addr <= 0x80000000 - s_memory_size; addr += 0x1000000)
+ {
More information about the svn-ports-all
mailing list