V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
luistrong
V2EX  ›  macOS

apple silicon M2 使用 intel 版本软件时如何禁用内存的写入保护

  •  
  •   luistrong · 2022-10-05 11:18:22 +08:00 · 1265 次点击
    这是一个创建于 561 天前的主题,其中的信息可能已经有所发展或是发生改变。
    papers3 在导入 pdf 时发生闪退, 分析原因是软件无法写入导致的.
    由于本人不懂代码, 勉强查到了一些可能的原因:

    由于 apple silicon 的 Write Protections 导致

    https://stackoverflow.com/questions/73389982/apple-silicon-m1-inexplicable-sigbus-crash

    Porting Just-In-Time Compilers to Apple Silicon
    https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon


    附上崩溃报告, 还请专业人士指点如何才能让这个软件具有写入磁盘的能力, 谢谢!
    (SIP 关闭与否都会崩溃)

    Date/Time: 2022-10-04 10:52:39.7531 +0800
    OS Version: macOS 12.5 (21G72)
    Report Version: 12
    Anonymous UUID: 82C6808D-4DC1-A998-4B90-6856811E3938

    Sleep/Wake UUID: 6520A5DA-7E46-437B-8828-008B1353BA30


    Crashed Thread: 6 Dispatch queue: NSOperationQueue 0x7fd51107c6a0 (QOS: UNSPECIFIED)

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
    Exception Codes: 0x0000000000000001, 0x0000000000000000
    Exception Note: EXC_CORPSE_NOTIFY

    Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
    Terminating Process: exc handler [2453]

    VM Region Info: 0 is not in any region. Bytes before following region: 4330409984
    REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
    UNUSED SPACE AT START
    --->
    __TEXT 1021cd000-102420000 [ 2380K] r-x/rwx SM=COW .../MacOS/Papers


    External Modification Summary:
    Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
    Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
    Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

    VM Region Summary:
    ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(100%)
    Writable regions: Total=2.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.3G(100%)
    6 条回复    2022-10-11 19:37:53 +08:00
    ptyfork
        1
    ptyfork  
       2022-10-05 16:24:15 +08:00 via iPhone
    还有在用 papers3 啊,不更新了吗?
    luistrong
        2
    luistrong  
    OP
       2022-10-05 18:37:28 +08:00
    @ptyfork #1 很早就不更新了, 很难找到可替代的
    dingwen07
        3
    dingwen07  
       2022-10-06 00:12:31 +08:00 via iPhone
    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
    Exception Codes: 0x0000000000000001, 0x0000000000000000
    Exception Note: EXC_CORPSE_NOTIFY

    感觉是别的原因导致的
    0x0 肯定不会是指令的内存啊
    luistrong
        4
    luistrong  
    OP
       2022-10-06 10:12:59 +08:00
    @dingwen07 #3 感觉很奇怪, 就是找不到原因, 感觉找到原因后这软件可能还有救
    elementp
        5
    elementp  
       2022-10-11 15:08:17 +08:00
    你发的这两个链接是关于 JIT 编译器需要注意的 Apple Silicon 内存写保护特性,感觉和你这个软件以及这个错误没什么关系。错误报告里看起来是在试图访问空指针
    luistrong
        6
    luistrong  
    OP
       2022-10-11 19:37:53 +08:00
    @elementp #5 这文献管理软件功能啥都好使, 就是导入 pdf 会闪退, 请问这种问题可以通过对应用进行修改解决吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5627 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 03:34 · PVG 11:34 · LAX 20:34 · JFK 23:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.