* bug#56443: 28.1; Mac segmentation fault with ffap
@ 2022-07-07 17:18 Stephen Eglen
2022-07-07 20:36 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-08 9:35 ` Mattias Engdegård
0 siblings, 2 replies; 11+ messages in thread
From: Stephen Eglen @ 2022-07-07 17:18 UTC (permalink / raw)
To: 56443
Can anyone replicate the following on Mac M1? I'm using the 'emacs'
cask from homebrew, and I get the crash both with GUI and terminal
version of Emacs. This seems to be mac-specific; I do not see the
problem on linux.
Starting emacs from the terminal.
$ emacs -nw -q
(require 'ffap)
Then with point somewhere over an email, e.g. sje30@cam.ac.uk,
if I run M-x find-file-at-point I get:
Fatal error 11: Segmentation fault
and emacs quits.
In my initial debugging from the elisp side, it seems to happen with the function ffap-prompter, when the unwind-protect statement finishes.
Under the GUI, the backtrace reported is attached.
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Emacs-arm64-11 [87375]
Path: /Applications/Emacs.app/Contents/MacOS/Emacs-arm64-11
Identifier: Emacs-arm64-11
Version: ???
Code Type: ARM-64 (Native)
Parent Process: zsh [83690]
Responsible: Terminal [559]
User ID: 501
Date/Time: 2022-07-07 15:56:24.5056 +0100
OS Version: macOS 12.4 (21F79)
Report Version: 12
Anonymous UUID: 053D4162-097E-498B-8271-FD08E58B5587
Sleep/Wake UUID: B40490E6-25CF-4FA7-BFEC-F3A26E0CB216
Time Awake Since Boot: 490000 seconds
Time Since Wake: 3859 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000004
Exception Codes: 0x0000000000000001, 0x0000000000000004
Exception Note: EXC_CORPSE_NOTIFY
VM Region Info: 0x4 is not in any region. Bytes before following region: 105553518919676
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-/rwx SM=NUL ...(unallocated)
Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x19fc9ad98 __pthread_kill + 8
1 libsystem_pthread.dylib 0x19fccfee0 pthread_kill + 288
2 libsystem_c.dylib 0x19fbd2680 raise + 32
3 Emacs-arm64-11 0x1028c977c terminate_due_to_signal + 204
4 Emacs-arm64-11 0x1028c9e08 emacs_abort + 20
5 Emacs-arm64-11 0x10289817c ns_term_shutdown + 144
6 Emacs-arm64-11 0x102795eec shut_down_emacs + 328
7 Emacs-arm64-11 0x1028c9744 terminate_due_to_signal + 148
8 Emacs-arm64-11 0x1027b5310 handle_fatal_signal + 16
9 Emacs-arm64-11 0x1027b538c deliver_thread_signal + 124
10 Emacs-arm64-11 0x1027b3898 deliver_fatal_thread_signal + 12
11 libsystem_platform.dylib 0x19fce74a4 _sigtramp + 56
12 Emacs-arm64-11 0x1027cde38 Ffile_name_case_insensitive_p + 108
13 Emacs-arm64-11 0x1027cde38 Ffile_name_case_insensitive_p + 108
14 Emacs-arm64-11 0x10281a244 funcall_subr + 264
15 Emacs-arm64-11 0x102819818 Ffuncall + 752
16 Emacs-arm64-11 0x102819818 Ffuncall + 752
17 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
18 Emacs-arm64-11 0x102819790 Ffuncall + 616
19 Emacs-arm64-11 0x102815c58 call2 + 48
20 Emacs-arm64-11 0x10281a244 funcall_subr + 264
21 Emacs-arm64-11 0x102819818 Ffuncall + 752
22 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
23 Emacs-arm64-11 0x102819790 Ffuncall + 616
24 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
25 Emacs-arm64-11 0x102819790 Ffuncall + 616
26 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
27 Emacs-arm64-11 0x102819790 Ffuncall + 616
28 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
29 Emacs-arm64-11 0x102819790 Ffuncall + 616
30 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
31 Emacs-arm64-11 0x102819790 Ffuncall + 616
32 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
33 Emacs-arm64-11 0x102819790 Ffuncall + 616
34 Emacs-arm64-11 0x102812bd0 Ffuncall_interactively + 80
35 Emacs-arm64-11 0x102819818 Ffuncall + 752
36 Emacs-arm64-11 0x102812ec4 Fcall_interactively + 732
37 Emacs-arm64-11 0x10281a268 funcall_subr + 300
38 Emacs-arm64-11 0x102819818 Ffuncall + 752
39 Emacs-arm64-11 0x10285abec exec_byte_code + 1952
40 Emacs-arm64-11 0x102819790 Ffuncall + 616
41 Emacs-arm64-11 0x102819ebc call1 + 44
42 Emacs-arm64-11 0x102799b44 command_loop_1 + 1640
43 Emacs-arm64-11 0x102817950 internal_condition_case + 264
44 Emacs-arm64-11 0x1027994c8 command_loop_2 + 52
45 Emacs-arm64-11 0x102816f24 internal_catch + 264
46 Emacs-arm64-11 0x1028c9a8c recursive_edit_1.cold.1 + 80
47 Emacs-arm64-11 0x102798cf8 recursive_edit_1 + 268
48 Emacs-arm64-11 0x102798ea0 Frecursive_edit + 388
49 Emacs-arm64-11 0x10279828c main + 9036
50 dyld 0x102fd508c start + 520
Thread 1:
0 libsystem_pthread.dylib 0x19fccb078 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x19fccb078 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x19fccb078 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x19fc9d598 __select + 8
1 Emacs-arm64-11 0x1028994fc -[EmacsApp fd_handler:] + 244
2 Foundation 0x1a0c7763c __NSThread__start__ + 808
3 libsystem_pthread.dylib 0x19fcd026c _pthread_start + 148
4 libsystem_pthread.dylib 0x19fccb08c thread_start + 8
Thread 5:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x19fc928b0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x19fc92d20 mach_msg + 76
2 CoreFoundation 0x19fd9d2b0 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x19fd9b760 __CFRunLoopRun + 1180
4 CoreFoundation 0x19fd9ab24 CFRunLoopRunSpecific + 600
5 AppKit 0x1a2a6e374 _NSEventThread + 196
6 libsystem_pthread.dylib 0x19fcd026c _pthread_start + 148
7 libsystem_pthread.dylib 0x19fccb08c thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x000000019fadf04c
x4: 0x0000600001a6cac0 x5: 0x0000000000000000 x6: 0x0000000000000400 x7: 0x0000000000000db0
x8: 0x10463841980e475b x9: 0x104638409b0ac2db x10: 0x0000000000000001 x11: 0x02000001f869a96d
x12: 0x0000000000000057 x13: 0x00000000fdafc091 x14: 0x00000000fdcfc800 x15: 0x00000000000001f9
x16: 0x0000000000000148 x17: 0x00000001f9d5b680 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000103048580 x21: 0x0000000000000103 x22: 0x0000000103048660 x23: 0x0000000000002910
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x400000003f000000 x27: 0x4000000019000000
x28: 0x4000000017000000 fp: 0x000000016d71d1f0 lr: 0x000000019fccfee0
sp: 0x000000016d71d1d0 pc: 0x000000019fc9ad98 cpsr: 0x40001000
far: 0x00006000026cc740 esr: 0x56000080 Address size fault
Binary Images:
0x19fc91000 - 0x19fcc8fff libsystem_kernel.dylib (*) <03f48dc5-caa7-3678-af61-1a3c7fa8b06e> /usr/lib/system/libsystem_kernel.dylib
0x19fcc9000 - 0x19fcd5fff libsystem_pthread.dylib (*) <42166a2c-89a9-3c38-a215-f028544cea23> /usr/lib/system/libsystem_pthread.dylib
0x19fb90000 - 0x19fc11fff libsystem_c.dylib (*) <86746b94-88e3-342d-b2b2-54303404e492> /usr/lib/system/libsystem_c.dylib
0x1026e0000 - 0x10290bfff Emacs-arm64-11 (*) <70bcc1e9-bc20-3e28-a912-c26c3baf0e68> /Applications/Emacs.app/Contents/MacOS/Emacs-arm64-11
0x19fce3000 - 0x19fceafff libsystem_platform.dylib (*) <d7aba99f-ba00-36e9-945d-48acf57fc568> /usr/lib/system/libsystem_platform.dylib
0x102fd0000 - 0x10302ffff dyld (*) <d9c2a46e-8dc4-3950-9d6a-f799e8ccb683> /usr/lib/dyld
0x1a0c1b000 - 0x1a100cfff com.apple.Foundation (6.9) <a2e534d9-cdf0-397f-a41e-147559c83893> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x19fd18000 - 0x1a025efff com.apple.CoreFoundation (6.9) <994db908-11a1-3e43-b7df-25c09d51368a> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1a28c0000 - 0x1a3777fff com.apple.AppKit (6.9) <a773dd23-b1c8-3c9b-9175-9a71d210ace0> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
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=844.2M resident=0K(0%) swapped_out_or_unallocated=844.2M(100%)
Writable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 384K 3
Activity Tracing 256K 1
CG backing stores 4288K 8
CG image 384K 6
ColorSync 512K 25
CoreAnimation 416K 18
CoreGraphics 32K 2
CoreImage 48K 2
CoreServices 80K 1
CoreUI image data 1088K 7
Foundation 16K 1
Kernel Alloc Once 32K 1
MALLOC 265.3M 48
MALLOC guard page 192K 10
MALLOC_MEDIUM (reserved) 720.0M 6 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 54.5M 6
Stack 12.2M 7
VM_ALLOCATE 288K 18
__AUTH 1933K 191
__AUTH_CONST 11.4M 355
__CTF 756 1
__DATA 12.8M 349
__DATA_CONST 12.2M 367
__DATA_DIRTY 874K 121
__FONT_DATA 4K 1
__LINKEDIT 579.6M 13
__OBJC_CONST 1816K 163
__OBJC_RO 83.0M 1
__OBJC_RW 3152K 1
__TEXT 264.6M 381
__UNICODE 592K 1
dyld private memory 1024K 1
mapped file 168.4M 29
shared memory 880K 15
=========== ======= =======
TOTAL 2.5G 2161
TOTAL, minus reserved VM space 1.4G 2161
-----------
Full Report
-----------
{"app_name":"Emacs-arm64-11","timestamp":"2022-07-07 15:56:25.00 +0100","app_version":"","slice_uuid":"70bcc1e9-bc20-3e28-a912-c26c3baf0e68","build_version":"","platform":1,"share_with_app_devs":1,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.4 (21F79)","incident_id":"A33E6451-F215-495A-A8A1-6DA935CA2CB6","name":"Emacs-arm64-11"}
{
"uptime" : 490000,
"procLaunch" : "2022-07-07 15:56:12.0429 +0100",
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro18,3",
"procStartAbsTime" : 11883715981529,
"coalitionID" : 562,
"osVersion" : {
"train" : "macOS 12.4",
"build" : "21F79",
"releaseType" : "User"
},
"captureTime" : "2022-07-07 15:56:24.5056 +0100",
"incident" : "A33E6451-F215-495A-A8A1-6DA935CA2CB6",
"bug_type" : "309",
"pid" : 87375,
"procExitAbsTime" : 11884014949755,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "Emacs-arm64-11",
"procPath" : "\/Applications\/Emacs.app\/Contents\/MacOS\/Emacs-arm64-11",
"parentProc" : "zsh",
"parentPid" : 83690,
"coalitionName" : "com.apple.Terminal",
"crashReporterKey" : "053D4162-097E-498B-8271-FD08E58B5587",
"responsiblePid" : 559,
"responsibleProc" : "Terminal",
"wakeTime" : 3859,
"sleepWakeUUID" : "B40490E6-25CF-4FA7-BFEC-F3A26E0CB216",
"sip" : "enabled",
"vmRegionInfo" : "0x4 is not in any region. Bytes before following region: 105553518919676\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-\/rwx SM=NUL ...(unallocated)",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000001, 0x0000000000000004","rawCodes":[1,4],"type":"EXC_BAD_ACCESS","signal":"SIGABRT","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000004"},
"ktriageinfo" : "VM - pmap_enter failed with resource shortage\nVM - pmap_enter failed with resource shortage\nVM - pmap_enter failed with resource shortage\nVM - pmap_enter failed with resource shortage\nVM - pmap_enter failed with resource shortage\n",
"vmregioninfo" : "0x4 is not in any region. Bytes before following region: 105553518919676\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-\/rwx SM=NUL ...(unallocated)",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":4214136,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":6973943884,"symbolLocation":0,"symbol":"nanov2_free_definite_size"},{"value":105553143974592},{"value":0},{"value":1024},{"value":3504},{"value":1172686607351695195},{"value":1172686603106829019},{"value":1},{"value":144115196538497389,"symbolLocation":144115188075855877,"symbol":"OBJC_CLASS_$__CFXPreferences"},{"value":87},{"value":4256153745},{"value":4258252800},{"value":505},{"value":328},{"value":8486499968},{"value":0},{"value":6},{"value":4345595264,"symbolLocation":0,"symbol":"_main_thread"},{"value":259},{"value":4345595488,"symbolLocation":224,"symbol":"_main_thread"},{"value":10512},{"value":0},{"value":0},{"value":4611686019484352512},{"value":4611686018846818304},{"value":4611686018813263872}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6975979232},"cpsr":{"value":1073745920},"fp":{"value":6131143152},"sp":{"value":6131143120},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6975761816,"matchesCrashFrame":1},"far":{"value":105553156949824}},"queue":"com.apple.main-thread","frames":[{"imageOffset":40344,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":0},{"imageOffset":28384,"symbol":"pthread_kill","symbolLocation":288,"imageIndex":1},{"imageOffset":272000,"symbol":"raise","symbolLocation":32,"imageIndex":2},{"imageOffset":2004860,"symbol":"terminate_due_to_signal","symbolLocation":204,"imageIndex":3},{"imageOffset":2006536,"symbol":"emacs_abort","symbolLocation":20,"imageIndex":3},{"imageOffset":1802620,"symbol":"ns_term_shutdown","symbolLocation":144,"imageIndex":3},{"imageOffset":745196,"symbol":"shut_down_emacs","symbolLocation":328,"imageIndex":3},{"imageOffset":2004804,"symbol":"terminate_due_to_signal","symbolLocation":148,"imageIndex":3},{"imageOffset":873232,"symbol":"handle_fatal_signal","symbolLocation":16,"imageIndex":3},{"imageOffset":873356,"symbol":"deliver_thread_signal","symbolLocation":124,"imageIndex":3},{"imageOffset":866456,"symbol":"deliver_fatal_thread_signal","symbolLocation":12,"imageIndex":3},{"imageOffset":17572,"symbol":"_sigtramp","symbolLocation":56,"imageIndex":4},{"imageOffset":974392,"symbol":"Ffile_name_case_insensitive_p","symbolLocation":108,"imageIndex":3},{"imageOffset":974392,"symbol":"Ffile_name_case_insensitive_p","symbolLocation":108,"imageIndex":3},{"imageOffset":1286724,"symbol":"funcall_subr","symbolLocation":264,"imageIndex":3},{"imageOffset":1284120,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":3},{"imageOffset":1284120,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1268824,"symbol":"call2","symbolLocation":48,"imageIndex":3},{"imageOffset":1286724,"symbol":"funcall_subr","symbolLocation":264,"imageIndex":3},{"imageOffset":1284120,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1256400,"symbol":"Ffuncall_interactively","symbolLocation":80,"imageIndex":3},{"imageOffset":1284120,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":3},{"imageOffset":1257156,"symbol":"Fcall_interactively","symbolLocation":732,"imageIndex":3},{"imageOffset":1286760,"symbol":"funcall_subr","symbolLocation":300,"imageIndex":3},{"imageOffset":1284120,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":3},{"imageOffset":1551340,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":3},{"imageOffset":1283984,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":3},{"imageOffset":1285820,"symbol":"call1","symbolLocation":44,"imageIndex":3},{"imageOffset":760644,"symbol":"command_loop_1","symbolLocation":1640,"imageIndex":3},{"imageOffset":1276240,"symbol":"internal_condition_case","symbolLocation":264,"imageIndex":3},{"imageOffset":758984,"symbol":"command_loop_2","symbolLocation":52,"imageIndex":3},{"imageOffset":1273636,"symbol":"internal_catch","symbolLocation":264,"imageIndex":3},{"imageOffset":2005644,"symbol":"recursive_edit_1.cold.1","symbolLocation":80,"imageIndex":3},{"imageOffset":756984,"symbol":"recursive_edit_1","symbolLocation":268,"imageIndex":3},{"imageOffset":757408,"symbol":"Frecursive_edit","symbolLocation":388,"imageIndex":3},{"imageOffset":754316,"symbol":"main","symbolLocation":9036,"imageIndex":3},{"imageOffset":20620,"symbol":"start","symbolLocation":520,"imageIndex":5}]},{"id":4214138,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":4214157,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":4214159,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":4214166,"frames":[{"imageOffset":50584,"symbol":"__select","symbolLocation":8,"imageIndex":0},{"imageOffset":1807612,"symbol":"-[EmacsApp fd_handler:]","symbolLocation":244,"imageIndex":3},{"imageOffset":378428,"symbol":"__NSThread__start__","symbolLocation":808,"imageIndex":6},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":4214188,"name":"com.apple.NSEventThread","frames":[{"imageOffset":6320,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":7456,"symbol":"mach_msg","symbolLocation":76,"imageIndex":0},{"imageOffset":545456,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":372,"imageIndex":7},{"imageOffset":538464,"symbol":"__CFRunLoopRun","symbolLocation":1180,"imageIndex":7},{"imageOffset":535332,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":7},{"imageOffset":1762164,"symbol":"_NSEventThread","symbolLocation":196,"imageIndex":8},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64e",
"base" : 6975721472,
"size" : 229376,
"uuid" : "03f48dc5-caa7-3678-af61-1a3c7fa8b06e",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6975950848,
"size" : 53248,
"uuid" : "42166a2c-89a9-3c38-a215-f028544cea23",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6974668800,
"size" : 532480,
"uuid" : "86746b94-88e3-342d-b2b2-54303404e492",
"path" : "\/usr\/lib\/system\/libsystem_c.dylib",
"name" : "libsystem_c.dylib"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4335730688,
"size" : 2277376,
"uuid" : "70bcc1e9-bc20-3e28-a912-c26c3baf0e68",
"path" : "\/Applications\/Emacs.app\/Contents\/MacOS\/Emacs-arm64-11",
"name" : "Emacs-arm64-11"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6976057344,
"size" : 32768,
"uuid" : "d7aba99f-ba00-36e9-945d-48acf57fc568",
"path" : "\/usr\/lib\/system\/libsystem_platform.dylib",
"name" : "libsystem_platform.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 4345102336,
"size" : 393216,
"uuid" : "d9c2a46e-8dc4-3950-9d6a-f799e8ccb683",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6992015360,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.Foundation",
"size" : 4136960,
"uuid" : "a2e534d9-cdf0-397f-a41e-147559c83893",
"path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
"name" : "Foundation",
"CFBundleVersion" : "1863"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6976274432,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 5533696,
"uuid" : "994db908-11a1-3e43-b7df-25c09d51368a",
"path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
"name" : "CoreFoundation",
"CFBundleVersion" : "1863"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7022051328,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.AppKit",
"size" : 15433728,
"uuid" : "a773dd23-b1c8-3c9b-9175-9a71d210ace0",
"path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
"name" : "AppKit",
"CFBundleVersion" : "2113.50.132"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
}
],
"sharedCache" : {
"base" : 6972653568,
"size" : 3136077824,
"uuid" : "513553bb-5ca5-3b9e-a613-b0603ffe3038"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=844.2M resident=0K(0%) swapped_out_or_unallocated=844.2M(100%)\nWritable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 384K 3 \nActivity Tracing 256K 1 \nCG backing stores 4288K 8 \nCG image 384K 6 \nColorSync 512K 25 \nCoreAnimation 416K 18 \nCoreGraphics 32K 2 \nCoreImage 48K 2 \nCoreServices 80K 1 \nCoreUI image data 1088K 7 \nFoundation 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 265.3M 48 \nMALLOC guard page 192K 10 \nMALLOC_MEDIUM (reserved) 720.0M 6 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 54.5M 6 \nStack 12.2M 7 \nVM_ALLOCATE 288K 18 \n__AUTH 1933K 191 \n__AUTH_CONST 11.4M 355 \n__CTF 756 1 \n__DATA 12.8M 349 \n__DATA_CONST 12.2M 367 \n__DATA_DIRTY 874K 121 \n__FONT_DATA 4K 1 \n__LINKEDIT 579.6M 13 \n__OBJC_CONST 1816K 163 \n__OBJC_RO 83.0M 1 \n__OBJC_RW 3152K 1 \n__TEXT 264.6M 381 \n__UNICODE 592K 1 \ndyld private memory 1024K 1 \nmapped file 168.4M 29 \nshared memory 880K 15 \n=========== ======= ======= \nTOTAL 2.5G 2161 \nTOTAL, minus reserved VM space 1.4G 2161 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "607844aa04477260f58a8077",
"factorPackIds" : {
"SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
},
"deploymentId" : 240000066
},
{
"rolloutId" : "61301e3a61217b3110231469",
"factorPackIds" : {
"SIRI_FIND_MY_CONFIGURATION_FILES" : "6216ae152a40e71046e16225"
},
"deploymentId" : 240000016
}
],
"experiments" : [
]
}
}
Model: MacBookPro18,3, BootROM 7459.121.3, proc 10:8:2 processors, 16 GB, SMC
Graphics: Apple M1 Pro, Apple M1 Pro, Built-In
Display: Color LCD, 3024 x 1964 Retina, Main, MirrorOff, Online
Display: DELL P2417H, 1920 x 1080 (1080p FHD - Full High Definition), MirrorOff, Online
Memory Module: LPDDR5
AirPort: Wi-Fi, wl0: Apr 6 2022 05:55:54 version 20.90.45.0.8.7.118 FWID 01-e7138ff2
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB 10/100/1000 LAN
USB Device: USB2.0 Hub
USB Device: USB Receiver
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
In GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559))
of 2022-05-11 built on armbob.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description: macOS 12.4
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'
Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB
Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: mu4e:view
Minor modes in effect:
vertico-reverse-mode: t
vertico-mode: t
windmove-mode: t
pdf-occur-global-minor-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
global-edit-server-edit-mode: t
csv-field-index-mode: t
recentf-mode: t
shell-dirtrack-mode: t
TeX-PDF-mode: t
mu4e-search-minor-mode: t
mu4e-context-minor-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
display-time-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
/Users/stephen/.emacs.d/straight/build/ivy/elpa hides /Users/stephen/.emacs.d/straight/build/lispy/elpa
/Users/stephen/.emacs.d/straight/build/loccur/loccur hides ~/langs/emacs/elisp-ds/loccur
/Users/stephen/.emacs.d/straight/build/csv-mode/csv-mode hides ~/langs/emacs/elisp-ds/csv-mode
~/langs/emacs/elisp-ds/emaxima/maxima hides ~/langs/emacs/maxima
~/langs/emacs/elisp-ds/emaxima/maxima-font-lock hides ~/langs/emacs/maxima-font-lock
/Users/stephen/.emacs.d/straight/build/transient/transient hides /Applications/Emacs.app/Contents/Resources/lisp/transient
~/langs/emacs/mspools hides /Applications/Emacs.app/Contents/Resources/lisp/mail/mspools
/Users/stephen/.emacs.d/straight/build/let-alist/let-alist hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist
Features:
(shadow emacsbug org-duration cal-iso dabbrev tabify notdeft-org notdeft
notdeft-xapian pdf-sync pdf-annot facemenu pdf-outline pdf-links
pdf-history qp gnus-cite smiley shr-color mm-archive ox-org ess-sp6-d
flymake-shellcheck ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc
ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe
ol-docview ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi vc-mtn vc-hg
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs mail-extr so-long view emms
emms-compat emms-autoloads org-modern org-modern-autoloads json-mode
json-snatcher js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine json-mode-autoloads json-snatcher-autoloads sudo-edit
sudo-edit-autoloads deadgrep spinner deadgrep-autoloads
spinner-autoloads yasnippet yasnippet-autoloads
flymake-shellcheck-autoloads wolfram-mode-autoloads orderless
orderless-autoloads vertico-reverse consult-vertico vertico
vertico-autoloads consult compat-28 consult-autoloads rg vc rg-info-hack
rg-menu rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header grep
rg-autoloads wgrep-autoloads loccur loccur-autoloads fd-dired-autoloads
notdeft-global notdeft-org9 notdeft-autoloads hydra lv lispy-autoloads
zoutline-autoloads hydra-autoloads lv-autoloads swiper-autoloads
ivy-autoloads iedit-autoloads ace-window-autoloads avy-autoloads
gif-screencast xdg gif-screencast-autoloads keycast keycast-autoloads
olivetti olivetti-autoloads wwg writer-word-goals-autoloads windswap
windmove windswap-autoloads list-unicode-display
list-unicode-display-autoloads shackle trace shackle-autoloads lua-mode
lua-mode-autoloads hugo-autoloads org-recoll doc-view
yesterbox-autoloads package-lint finder package-lint-autoloads
docker-tramp-autoloads docker-tramp tramp-cache dockerfile-mode
sh-script smie executable dockerfile-mode-autoloads yaml-mode
yaml-mode-autoloads vterm-toggle tramp-sh vterm-toggle-autoloads vterm
face-remap term disp-table ehelp vterm-module term/xterm xterm
vterm-autoloads keychain-environment keychain-environment-autoloads
zygospore zygospore-autoloads modus-operandi-theme modus-themes
modus-themes-autoloads solarized-theme solarized solarized-faces
solarized-theme-autoloads pdf-occur ibuf-ext ibuffer ibuffer-loaddefs
tablist tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw cedet pdf-isearch let-alist
pdf-misc pdf-tools cus-edit cus-start cus-load pdf-view jka-compr
pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif
pdf-tools-autoloads let-alist-autoloads tablist-autoloads magit-bookmark
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit package url-handlers magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff git-commit log-edit
pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor magit-mode transient magit-git
magit-base magit-section dash compat-27 compat-26 compat magit-autoloads
magit-section-autoloads git-commit-autoloads with-editor-autoloads
transient-autoloads dash-autoloads compat-autoloads s edit-server
edit-server-autoloads poly-R poly-noweb poly-R-autoloads
poly-noweb-autoloads ess-knitr org-mu4e midnight mu4e-icalendar
gnus-icalendar org-capture icalendar diary-lib diary-loaddefs csv-mode
sort csv-mode-autoloads finder-inf ob-latex ob-ditaa ob-dot ob-shell
ob-R recentf tree-widget ox-beamer ox-odt rng-loc rng-uri rng-parse
rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar org-agenda org-refile ox-html table
ox-ascii ox-publish ox org-element avl-tree generator server cc-vars
cc-defs quarto-mode ess-r-mode ess-r-flymake flymake-proc flymake
warnings ess-r-xref xref ess-trns ess-r-package ess-r-completion
ess-roxy ess-r-syntax ess-rd hideshow ess-s-lang ess-help ess-mode
ess-inf ess-tracebug compile tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat ls-lisp request autorevert
filenotify mode-local shell poly-markdown markdown-mode polymode
poly-lock polymode-base polymode-weave polymode-export polymode-compat
polymode-methods polymode-core polymode-classes eieio-custom eieio-base
color quarto-mode-autoloads request-autoloads poly-markdown-autoloads
markdown-mode-autoloads polymode-autoloads ess lisp-mnt ess-utils
ess-custom project ess-autoloads julia-repl-autoloads s-autoloads
julia-mode julia-mode-latexsubs julia-mode-autoloads fm emacs-keys move
ffap my-tex tex crm texmathp auctex-autoloads tex-site my-elisp
time-stamp my-c tempo-examples tempo others-elisp mu4e mu4e-org
mu4e-view thingatpt gnus-art mm-uu mml2015 mm-view mml-smime smime dig
gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud
nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range gnus-win gnus nnheader wid-edit org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities org-version ob-emacs-lisp ob-core ob-eval org-table
oc-basic bibtex iso8601 ol rx org-keys oc org-compat advice org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
mu4e-main mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail
sendmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message
shr kinsoku svg xml dom browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
url-vars flow-fill mailcap hl-line mu4e-contacts mu4e-update
mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config
bookmark pp ido message rmc puny dired dired-loaddefs rfc822 mml mml-sec
epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs
auth-source eieio eieio-core eieio-loaddefs password-cache json map
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
mail-utils gmm-utils mailheader pcase use-package-core
use-package-autoloads bind-key-autoloads straight-autoloads info cl-seq
cl-extra help-mode straight subr-x cl-macs outlines edmacro kmacro
noutline outline time vc-git diff-mode easy-mmode vc-dispatcher seq
byte-opt gv bytecomp byte-compile cconv misearch multi-isearch
cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)
Memory information:
((conses 16 856196 208075)
(symbols 48 76838 5)
(strings 32 239142 30744)
(string-bytes 1 8299006)
(vectors 16 107352)
(vector-slots 8 2209870 143303)
(floats 8 1046 961)
(intervals 56 13166 13380)
(buffers 992 136))
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-07 17:18 bug#56443: 28.1; Mac segmentation fault with ffap Stephen Eglen
@ 2022-07-07 20:36 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-08 5:39 ` Eli Zaretskii
2022-07-08 9:35 ` Mattias Engdegård
1 sibling, 1 reply; 11+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-07 20:36 UTC (permalink / raw)
To: Stephen Eglen; +Cc: 56443
Stephen Eglen <sje30@cam.ac.uk> writes:
> Can anyone replicate the following on Mac M1? I'm using the 'emacs'
> cask from homebrew, and I get the crash both with GUI and terminal
> version of Emacs. This seems to be mac-specific; I do not see the
> problem on linux.
>
Yes, I can reproduce the crash. Attaching a debugger I see that the
filename passed through file-name-case-insensitive-p is NULL:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x4)
* frame #0: 0x0000000100d61c2c emacs`STRING_MULTIBYTE(str=0x0000000000000000) at lisp.h:1613:34
frame #1: 0x0000000100d64f68 emacs`encode_file_name_1(fname=0x0000000000000000) at coding.c:10397:8
frame #2: 0x0000000100d64f28 emacs`encode_file_name(fname=0x0000000000000000) at coding.c:10419:25
frame #3: 0x0000000100e2e098 emacs`file_name_case_insensitive_err(file=0x0000000000000000) at fileio.c:2555:28
frame #4: 0x0000000100e2dfcc emacs`Ffile_name_case_insensitive_p(filename=0x0000000000000000) at fileio.c:2600:17
frame #5: 0x0000000100ec47ac emacs`funcall_subr(subr=0x0000000101083bb8, numargs=1, args=0x0000000138058580) at eval.c:2996:15
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-07 20:36 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-08 5:39 ` Eli Zaretskii
2022-07-08 9:54 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-07-08 5:39 UTC (permalink / raw)
To: Daniel Martín; +Cc: 56443, sje30
> Cc: 56443@debbugs.gnu.org
> Date: Thu, 07 Jul 2022 22:36:53 +0200
> From: Daniel Martín via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Stephen Eglen <sje30@cam.ac.uk> writes:
>
> > Can anyone replicate the following on Mac M1? I'm using the 'emacs'
> > cask from homebrew, and I get the crash both with GUI and terminal
> > version of Emacs. This seems to be mac-specific; I do not see the
> > problem on linux.
> >
>
> Yes, I can reproduce the crash. Attaching a debugger I see that the
> filename passed through file-name-case-insensitive-p is NULL:
>
> * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x4)
> * frame #0: 0x0000000100d61c2c emacs`STRING_MULTIBYTE(str=0x0000000000000000) at lisp.h:1613:34
> frame #1: 0x0000000100d64f68 emacs`encode_file_name_1(fname=0x0000000000000000) at coding.c:10397:8
> frame #2: 0x0000000100d64f28 emacs`encode_file_name(fname=0x0000000000000000) at coding.c:10419:25
> frame #3: 0x0000000100e2e098 emacs`file_name_case_insensitive_err(file=0x0000000000000000) at fileio.c:2555:28
> frame #4: 0x0000000100e2dfcc emacs`Ffile_name_case_insensitive_p(filename=0x0000000000000000) at fileio.c:2600:17
> frame #5: 0x0000000100ec47ac emacs`funcall_subr(subr=0x0000000101083bb8, numargs=1, args=0x0000000138058580) at eval.c:2996:15
That's not NULL, that's nil (which is represented as zero).
But I don't understand how could that happen, because
Ffile_name_case_insensitive_p checks the argument for validity:
DEFUN ("file-name-case-insensitive-p", Ffile_name_case_insensitive_p,
Sfile_name_case_insensitive_p, 1, 1, 0,
doc: /* Return t if file FILENAME is on a case-insensitive filesystem.
Return nil if FILENAME does not exist or is not on a case-insensitive
filesystem, or if there was trouble determining whether the filesystem
is case-insensitive. */)
(Lisp_Object filename)
{
Lisp_Object handler;
CHECK_STRING (filename); <<<<<<<<<<<<<<<<<<<<<<<<<<<<
filename = Fexpand_file_name (filename, Qnil);
So it seems like expand-file-name returned nil in this case?
Can someone step through the code, including stepping into
Fexpand_file_name, and see how we get that nil in this case?
(I tried to reproduce on my system, which is not a Mac, but I don't
see any nil filenames in that case.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-07 17:18 bug#56443: 28.1; Mac segmentation fault with ffap Stephen Eglen
2022-07-07 20:36 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-08 9:35 ` Mattias Engdegård
2022-07-08 10:45 ` Eli Zaretskii
1 sibling, 1 reply; 11+ messages in thread
From: Mattias Engdegård @ 2022-07-08 9:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: sje30, 56443, Daniel Martín
The call to file_name_directory returns nil (the argument being "mailto:sje30@cam.ac.uk"). What about:
@@ -2603,7 +2603,7 @@ DEFUN ("file-name-case-insensitive-p", Ffile_name_case_insensitive_p,
Lisp_Object parent = file_name_directory (filename);
/* Avoid infinite loop if the root has trouble
(impossible?). */
- if (!NILP (Fstring_equal (parent, filename)))
+ if (!STRINGP (parent) || !NILP (Fstring_equal (parent, filename)))
return Qnil;
filename = parent;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 5:39 ` Eli Zaretskii
@ 2022-07-08 9:54 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-08 10:02 ` Stephen Eglen
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-08 9:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 56443, sje30
Eli Zaretskii <eliz@gnu.org> writes:
>
> That's not NULL, that's nil (which is represented as zero).
>
> But I don't understand how could that happen, because
> Ffile_name_case_insensitive_p checks the argument for validity:
>
> DEFUN ("file-name-case-insensitive-p", Ffile_name_case_insensitive_p,
> Sfile_name_case_insensitive_p, 1, 1, 0,
> doc: /* Return t if file FILENAME is on a case-insensitive filesystem.
> Return nil if FILENAME does not exist or is not on a case-insensitive
> filesystem, or if there was trouble determining whether the filesystem
> is case-insensitive. */)
> (Lisp_Object filename)
> {
> Lisp_Object handler;
>
> CHECK_STRING (filename); <<<<<<<<<<<<<<<<<<<<<<<<<<<<
> filename = Fexpand_file_name (filename, Qnil);
>
> So it seems like expand-file-name returned nil in this case?
>
> Can someone step through the code, including stepping into
> Fexpand_file_name, and see how we get that nil in this case?
>
> (I tried to reproduce on my system, which is not a Mac, but I don't
> see any nil filenames in that case.)
Apparently it comes from the "parent" variable, which is the result of
the file_name_directory call:
Process 61514 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x000000010064fefc emacs`Ffile_name_case_insensitive_p(filename=0x000000011534dc44) at fileio.c:2608:18
2605 (impossible?). */
2606 if (!NILP (Fstring_equal (parent, filename)))
2607 return Qnil;
-> 2608 filename = parent;
2609 }
2610 }
2611
Target 0: (emacs) stopped.
(lldb) fr v parent
(Lisp_Object) parent = NULL
Is the following expression the correct way to manually interpret the
Lisp_Object as a Lisp_String? (where $ptr is the memory address of
"filename" in this scenario):
(char *) ((struct Lisp_String *)$ptr)->u.s.data
That prints an empty string in LLDB.
BTW, I don't really understand the semantics of
file-name-case-insensitive-p. The docstring says that it returns nil if
the file is not found, but these calls return t on my system:
(file-name-case-insensitive-p "")
(file-name-case-insensitive-p "FileThatDoesNotExist")
Does that make sense?
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 9:54 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-08 10:02 ` Stephen Eglen
2022-07-08 10:47 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Eglen @ 2022-07-08 10:02 UTC (permalink / raw)
To: Daniel Martín; +Cc: Eli Zaretskii, 56443, sje30
Thanks everyone for help debugging this.
> BTW, I don't really understand the semantics of
> file-name-case-insensitive-p. The docstring says that it returns nil if
> the file is not found, but these calls return t on my system:
>
> (file-name-case-insensitive-p "")
> (file-name-case-insensitive-p "FileThatDoesNotExist")
I also find that those two expressions return t on my mac, and nil on my
linux machine. This seems to be consistent with the doc string:
Return t if file FILENAME is on a case-insensitive filesystem. Return
nil if FILENAME does not exist or is not on a case-insensitive
filesystem, or if there was trouble determining whether the filesystem
is case-insensitive.
It returns t on mac as it is case-insensitive by default, presumbly
irrespective of whether the file exists.
One small suggestion for the docstring might be to remove the double
negative in the second sentence:
"is not on a case-insensitive filesystem"
could be
"is on a case-sensitive filesystem"
?
Stephen
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 9:35 ` Mattias Engdegård
@ 2022-07-08 10:45 ` Eli Zaretskii
2022-07-08 13:14 ` Mattias Engdegård
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-07-08 10:45 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: sje30, 56443, mardani29
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Fri, 8 Jul 2022 11:35:27 +0200
> Cc: Daniel Martín <mardani29@yahoo.es>, 56443@debbugs.gnu.org,
> sje30@cam.ac.uk
>
> The call to file_name_directory returns nil (the argument being "mailto:sje30@cam.ac.uk"). What about:
>
> @@ -2603,7 +2603,7 @@ DEFUN ("file-name-case-insensitive-p", Ffile_name_case_insensitive_p,
> Lisp_Object parent = file_name_directory (filename);
> /* Avoid infinite loop if the root has trouble
> (impossible?). */
> - if (!NILP (Fstring_equal (parent, filename)))
> + if (!STRINGP (parent) || !NILP (Fstring_equal (parent, filename)))
> return Qnil;
> filename = parent;
> }
Fine with me, but please update the comment to this effect.
But why does the original call to file_name_case_insensitive_err fail
in this case with err > 0 on macOS, and what is the value of err?
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 10:02 ` Stephen Eglen
@ 2022-07-08 10:47 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-07-08 10:47 UTC (permalink / raw)
To: Stephen Eglen; +Cc: sje30, 56443, mardani29
> From: Stephen Eglen <sje30@cam.ac.uk>
> Cc: Eli Zaretskii <eliz@gnu.org>, sje30@cam.ac.uk, 56443@debbugs.gnu.org
> Date: Fri, 08 Jul 2022 11:02:20 +0100
>
> Thanks everyone for help debugging this.
>
> > BTW, I don't really understand the semantics of
> > file-name-case-insensitive-p. The docstring says that it returns nil if
> > the file is not found, but these calls return t on my system:
> >
> > (file-name-case-insensitive-p "")
> > (file-name-case-insensitive-p "FileThatDoesNotExist")
>
> I also find that those two expressions return t on my mac, and nil on my
> linux machine. This seems to be consistent with the doc string:
>
>
> Return t if file FILENAME is on a case-insensitive filesystem. Return
> nil if FILENAME does not exist or is not on a case-insensitive
> filesystem, or if there was trouble determining whether the filesystem
> is case-insensitive.
>
> It returns t on mac as it is case-insensitive by default, presumbly
> irrespective of whether the file exists.
>
> One small suggestion for the docstring might be to remove the double
> negative in the second sentence:
>
> "is not on a case-insensitive filesystem"
>
> could be
>
> "is on a case-sensitive filesystem"
No, that's not accurate either. What we need to say that if the file
doesn't exist, we _might_ return nil, unless it's known in advance
that _all_ filesystems are case-insensitive.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 10:45 ` Eli Zaretskii
@ 2022-07-08 13:14 ` Mattias Engdegård
2022-07-08 16:12 ` Stephen Eglen
0 siblings, 1 reply; 11+ messages in thread
From: Mattias Engdegård @ 2022-07-08 13:14 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: sje30, 56443, mardani29
8 juli 2022 kl. 12.45 skrev Eli Zaretskii <eliz@gnu.org>:
> Fine with me, but please update the comment to this effect.
Certainly.
> But why does the original call to file_name_case_insensitive_err fail
> in this case with err > 0 on macOS, and what is the value of err?
It fails because the argument, "mailto:some@mail.address", is not an existing file and so pathconf(filename, _PC_CASE_SENSITIVE) returns -1 which means "don't know". (If a file of that name is indeed created then it returns 0 here because this is a case-insensitive file system.)
Perhaps we shouldn't ask about case-sensitivity for such names but then again those are legal file names to open and Ffile_name_insensitive_p doesn't know the intentions of the caller, and in any case the error leads us to try the parent directory which doesn't exist so everything works out for the best with the patch.
Pushed to master, with a test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 13:14 ` Mattias Engdegård
@ 2022-07-08 16:12 ` Stephen Eglen
2022-07-08 16:15 ` Mattias Engdegård
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Eglen @ 2022-07-08 16:12 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: sje30, Eli Zaretskii, 56443, mardani29
Thank you Mattias; working from master I can confirm I do not see an
error now.
Stephen
On Fri, Jul 08 2022, Mattias Engdegård wrote:
> 8 juli 2022 kl. 12.45 skrev Eli Zaretskii <eliz@gnu.org>:
>
>> Fine with me, but please update the comment to this effect.
>
> Certainly.
>
>> But why does the original call to file_name_case_insensitive_err fail
>> in this case with err > 0 on macOS, and what is the value of err?
>
> It fails because the argument, "mailto:some@mail.address", is not an
> existing file and so pathconf(filename, _PC_CASE_SENSITIVE) returns -1
> which means "don't know". (If a file of that name is indeed created
> then it returns 0 here because this is a case-insensitive file
> system.)
>
> Perhaps we shouldn't ask about case-sensitivity for such names but
> then again those are legal file names to open and
> Ffile_name_insensitive_p doesn't know the intentions of the caller,
> and in any case the error leads us to try the parent directory which
> doesn't exist so everything works out for the best with the patch.
>
> Pushed to master, with a test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#56443: 28.1; Mac segmentation fault with ffap
2022-07-08 16:12 ` Stephen Eglen
@ 2022-07-08 16:15 ` Mattias Engdegård
0 siblings, 0 replies; 11+ messages in thread
From: Mattias Engdegård @ 2022-07-08 16:15 UTC (permalink / raw)
To: Stephen Eglen; +Cc: 56443-done, Eli Zaretskii, Daniel Martín
8 juli 2022 kl. 18.12 skrev Stephen Eglen <sje30@cam.ac.uk>:
> Thank you Mattias; working from master I can confirm I do not see an
> error now.
Thanks for verifying (and for reporting it in the first place!) -- closing.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-07-08 16:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07 17:18 bug#56443: 28.1; Mac segmentation fault with ffap Stephen Eglen
2022-07-07 20:36 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-08 5:39 ` Eli Zaretskii
2022-07-08 9:54 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-08 10:02 ` Stephen Eglen
2022-07-08 10:47 ` Eli Zaretskii
2022-07-08 9:35 ` Mattias Engdegård
2022-07-08 10:45 ` Eli Zaretskii
2022-07-08 13:14 ` Mattias Engdegård
2022-07-08 16:12 ` Stephen Eglen
2022-07-08 16:15 ` Mattias Engdegård
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.