fs-uae icon indicating copy to clipboard operation
fs-uae copied to clipboard

filesys Crash on macOS

Open johngirvin opened this issue 3 years ago • 1 comments

FS-UAE 3.1.66 macOS 11.6.2 (20G314) x86 FSUAE config file: A500.fs-uae.zip

When using a folder mounted as a hard drive, I am seeing EXC_BAD_ACCESS (SIGSEGV) in the filesys thread after the Amiga code sends ACTION_FLUSH to the filesystem message port.

macOS crash report: fsuae-crash.txt Interesting parts:

Crashed Thread:        13  filesys
Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Termination Signal:    Segmentation fault: 11

Thread 13 Crashed:: filesys
0   fs-uae                        	0x000000000efb0870 flush_cache(_unit*, int) + 208 (filesys.cpp:2332)
1   fs-uae                        	0x000000000efa8ade action_flush(_unit*, unsigned int) + 71 (filesys.cpp:6106) [inlined]
2   fs-uae                        	0x000000000efa8ade handle_packet(_unit*, unsigned int, unsigned int) + 5310 (filesys.cpp:6709)

The Amiga code that sends ACTION_FLUSH is the systemFlushIo function found here: https://github.com/AmigaPorts/ACE/blob/b4a6fff5cda1593073e7ecf3154864a43097763e/src/ace/managers/system.c#L411

Disabling this function or running the Amiga code from an ADF resolves the crash.

johngirvin avatar Feb 06 '22 12:02 johngirvin

funny thing is that I'm using this code on various WinUAE versions with folder-as-harddisk feature and have zero problems.

tehKaiN avatar Feb 06 '22 12:02 tehKaiN