Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Sep 2023 02:03:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 273573] emulators/pcsx2: unbreak with kern.elf64.allow_wx=0
Message-ID:  <bug-273573-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273573

            Bug ID: 273573
           Summary: emulators/pcsx2: unbreak with kern.elf64.allow_wx=3D0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: martymac@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
          Assignee: martymac@FreeBSD.org
             Flags: maintainer-feedback?(martymac@FreeBSD.org)

Created attachment 244646
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D244646&action=
=3Dedit
v1 (apply via "git am")

$ sysctl kern.elf64.allow_wx=3D0
$ pcsx2-qt
[...]
Video Dumping Directory: /home/foo/.config/PCSX2/videos
Segmentation fault

Process 52821 stopped
* thread #7, name =3D 'CPU Thread', stop reason =3D signal SIGSEGV: invalid=
 address
(fault address: 0xe4edae0)
    frame #0: 0x000000082c29c41d
libthr.so.3`check_and_init_mutex(mutex=3D0x000000000e4edae0,
m=3D0x000000086944ba40) at thr_mutex.c:597:7
   594  {
   595          int ret;
   596
-> 597          *m =3D *mutex;
   598          ret =3D 0;
   599          if (*m =3D=3D THR_PSHARED_PTR) {
   600                  *m =3D __thr_pshared_offpage(mutex, 0);
(lldb) bt
* thread #7, name =3D 'CPU Thread', stop reason =3D signal SIGSEGV: invalid=
 address
(fault address: 0xe4edae0)
  * frame #0: 0x000000082c29c41d
libthr.so.3`check_and_init_mutex(mutex=3D0x000000000e4edae0,
m=3D0x000000086944ba40) at thr_mutex.c:597:7
    frame #1: 0x000000082c29bb86
libthr.so.3`__Tthr_mutex_lock(mutex=3D0x000000000e4edae0) at thr_mutex.c:75=
3:8
    frame #2: 0x000000082ea37289 libc++.so.1`std::__1::mutex::lock() [inlin=
ed]
std::__1::__libcpp_mutex_lock(__m=3D<unavailable>) at __threading_support:3=
03:10
    frame #3: 0x000000082ea37284
libc++.so.1`std::__1::mutex::lock(this=3D<unavailable>) at mutex.cpp:33:14
    frame #4: 0x0000000000a2edc7
pcsx2-qt`std::__1::unique_lock<std::__1::mutex>::unique_lock(this=3D0x00000=
0086944bcc0,
__m=3D0x000000000e4edae0) at __mutex_base:119:61
    frame #5: 0x00000000011824fa
pcsx2-qt`pxOnAssertFail(file=3D"/wrkdirs/usr/ports/emulators/pcsx2/work/pcs=
x2-1.7.4970/pcsx2/System.cpp",
line=3D181, func=3D"VirtualMemoryManagerPtr makeMemoryManager(const char *,=
 const
char *, size_t, size_t)", msg=3D"Failed to find a good place for the memory
allocation, recompilers may fail") at Assertions.cpp:95:19
    frame #6: 0x0000000000b2dcce pcsx2-qt`makeMemoryManager(name=3D"Code Me=
mory
Manager", file_mapping_name=3D0x0000000000000000, size=3D319815680,
offset_from_base=3D335544320) at System.cpp:181:3
    frame #7: 0x0000000000b2d9e2
pcsx2-qt`SysMainMemory::SysMainMemory(this=3D0x000018692aa24000) at
System.cpp:191:17
    frame #8: 0x0000000000b53ead
pcsx2-qt`std::__1::__unique_if<SysMainMemory>::__unique_single
std::__1::make_unique<SysMainMemory>() at unique_ptr.h:725:32
    frame #9: 0x0000000000b4545a
pcsx2-qt`VMManager::Internal::CPUThreadInitialize() at VMManager.cpp:347:16
    frame #10: 0x00000000007afa74
pcsx2-qt`EmuThread::run(this=3D0x0000186924a11520) at QtHost.cpp:377:7
    frame #11: 0x000000082fbce5f5
libQt6Core.so.6`QThreadPrivate::start(this=3D0x000000086944bf68)::$_0::oper=
ator()()
const at qthread_unix.cpp:321:14
    frame #12: 0x000000082fbcd05d libQt6Core.so.6`void (anonymous
namespace)::terminate_on_exception<QThreadPrivate::start(t=3D0x000000086944=
bf68)::$_0>(QThreadPrivate::start(void*)::$_0&&)
at qthread_unix.cpp:257:9
    frame #13: 0x000000082fbccfbd
libQt6Core.so.6`QThreadPrivate::start(arg=3D0x0000186924a11520) at
qthread_unix.cpp:280:5
    frame #14: 0x000000082c297a7a
libthr.so.3`thread_start(curthread=3D0x0000186924a13500) at thr_create.c:29=
2:16
(lldb) f 6
frame #6: 0x0000000000b2dcce pcsx2-qt`makeMemoryManager(name=3D"Code Memory
Manager", file_mapping_name=3D0x0000000000000000, size=3D319815680,
offset_from_base=3D335544320) at System.cpp:181:3
   178          // If it's i386 anything can reach anything so it doesn't
matter
   179          if (sizeof(void*) =3D=3D 8)
   180          {
-> 181                  pxAssertRel(0, "Failed to find a good place for the
memory allocation, recompilers may fail");
   182          }
   183          return std::make_shared<VirtualMemoryManager>(name,
file_mapping_name, 0, size);
   184  }

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273573-7788>