Bug 240495 - emulators/rpcs3: 0.0.6.8549 or later crash on FreeBSD 11.*
Summary: emulators/rpcs3: 0.0.6.8549 or later crash on FreeBSD 11.*
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-09-11 09:50 UTC by Jan Beich
Modified: 2019-09-11 11:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2019-09-11 09:50:45 UTC
$ c++ --version
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
Target: x86_64-unknown-freebsd11.3
Thread model: posix
InstalledDir: /usr/bin

$ pkg info -x rpcs
rpcs3-0.0.7.8689 # c1b0934f7

$ HOME=$(mktemp -dt rpcs3) lldb $(which rpcs3) -- --version
(lldb) target create "/usr/local/bin/rpcs3"
Current executable set to '/usr/local/bin/rpcs3' (x86_64).
(lldb) settings set -- target.run-args  "--version"
(lldb) run
Process 77944 launching
Process 77944 launched: '/usr/local/bin/rpcs3' (x86_64)
Process 77944 stopped
* thread #1, name = 'rpcs3', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x000000000055354c rpcs3`stx::type_info<stx::manual_fixed_typemap<void>::typeinfo>::index() const + 12
rpcs3`stx::type_info<stx::manual_fixed_typemap<void>::typeinfo>::index:
->  0x55354c <+12>: movl   0x10(%rdi), %eax
    0x55354f <+15>: popq   %rbp
    0x553550 <+16>: retq
    0x553551:       int3
(lldb) bt all
* thread #1, name = 'rpcs3', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
  * frame #0: 0x000000000055354c rpcs3`stx::type_info<stx::manual_fixed_typemap<void>::typeinfo>::index() const + 12
    frame #1: 0x0000000000553399 rpcs3`stx::type_counter<stx::manual_fixed_typemap<void>::typeinfo>::count() const + 25
    frame #2: 0x0000000000537c07 rpcs3`stx::type_info<stx::manual_fixed_typemap<void>::typeinfo>::type_info(stx::manual_fixed_typemap<void>::typeinfo, unsigned long) + 71
    frame #3: 0x00000000013ed8cf rpcs3`__cxx_global_var_init.45 + 63
    frame #4: 0x00000000038f3542 rpcs3`__do_global_ctors_aux + 34
    frame #5: 0x000000000043a856 rpcs3`_init + 14
    frame #6: 0x0000000804fc792c
    frame #7: 0x0000000804fc6882
  thread #2, name = 'rpcs3'
    frame #0: 0x000000080cbe5aca
    frame #1: 0x000000080c45b95b
    frame #2: 0x00000000004eb9a0 rpcs3`void std::__1::this_thread::sleep_for<long long, std::__1::ratio<1l, 1000l> >(__d=0x00007fffdfffdf10) at thread:448:9
    frame #3: 0x00000000005d981d rpcs3`logs::file_writer::file_writer(this=0x0000000815835078)::$_3::operator()() const at Log.cpp:426:5
    frame #4: 0x00000000005d972d rpcs3`decltype(__f=0x0000000815835078)::$_3>(fp)()) std::__1::__invoke<logs::file_writer::file_writer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_3>(logs::file_writer::file_writer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_3&&) at type_traits:4353:1
    frame #5: 0x00000000005d96d5 rpcs3`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, logs::file_writer::file_writer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_3>(__t=0x0000000815835070, (null)=__tuple_indices<> @ 0x00007fffdfffdf58)::$_3>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #6: 0x00000000005d9471 rpcs3`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, logs::file_writer::file_writer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_3> >(__vp=0x0000000815835070) at thread:352:5
    frame #7: 0x0000000805f11036
(lldb) reg read
General Purpose Registers:
       rax = 0x0000000005a4e448  rpcs3`stx::type_counter<stx::manual_fixed_typemap<void>::typeinfo>::type<pad_info>
       rbx = 0x0000000004fc28b8
       rcx = 0x0000000005a4e458  rpcs3`stx::type_counter<stx::manual_fixed_typemap<void>::typeinfo>::type<pad_info> + 16
       rdx = 0x00000000013ee4b0  rpcs3`void stx::manual_fixed_typemap<void>::typeinfo::call_dtor<pad_info>(void*&)
       rdi = 0x0000000000000000
       rsi = 0x00000000013ee440  rpcs3`void stx::manual_fixed_typemap<void>::typeinfo::call_ctor<pad_info>(void*&)
       rbp = 0x00007fffffffdbd0
       rsp = 0x00007fffffffdbd0
        r8 = 0x0000000000000000
        r9 = 0x0000000000000000
       r10 = 0x0000000815800000
       r11 = 0x0000000000000000
       r12 = 0x0000000804fe6c00
       r13 = 0x00007fffffffe9c8
       r14 = 0x000000080cc33f60
       r15 = 0x0000000805192880
       rip = 0x000000000055354c  rpcs3`stx::type_info<stx::manual_fixed_typemap<void>::typeinfo>::index() const + 12
    rflags = 0x0000000000010202
        cs = 0x0000000000000043


        ss = 0x000000000000003b



(lldb) disassemble --frame
rpcs3`stx::type_info<stx::manual_fixed_typemap<void>::typeinfo>::index:
    0x553540 <+0>:  pushq  %rbp
    0x553541 <+1>:  movq   %rsp, %rbp
    0x553544 <+4>:  movq   %rdi, -0x8(%rbp)
    0x553548 <+8>:  movq   -0x8(%rbp), %rdi
->  0x55354c <+12>: movl   0x10(%rdi), %eax
    0x55354f <+15>: popq   %rbp
    0x553550 <+16>: retq
Comment 1 Jan Beich freebsd_committer 2019-09-11 11:29:57 UTC
Regressed by https://github.com/RPCS3/rpcs3/commit/8517ccfdfa08 (found via bisecting)

Provided Clang/libc++ versions are same what changes between FreeBSD 11 and 12 could affect C++ runtime?