simonowen/samdisk

[samdisk 4.0 ALPHA] Segmentation fault on macOS writing to SD card

Opened this issue · 1 comments

Samdisk version: 0dc6c8a, built locally.

$ sudo samdisk copy pxe-boot-client.dsk /dev/disk4:7
Reading cylSegmentation fault: 11
$

This is under macOS Ventura 13.0.1, with an Apple M1 Max.

$ uname -a
Darwin Peters-MacBook-Pro.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64

Under samdisk 3.8.8, the above samdisk copy command works without errors.

I realise samdisk 4.0 is in alpha, so maybe this is expected.

Thanks Simon!

I can't remember if I've tried flash drive access with v4 under macOS, but it certainly shouldn't crash!

It's curious that the v3 works as it shares a lot of the same code in that area. Does sudo samdisk list -v work to show the local disk devices and details? That should perform some simple reading from the start of the disk.

I think I also remember some differences in behaviour between /dev/diskX and /dev/rdiskX. Perhaps also complications if there was a mounted filesystem on the device, from left over filesystem structures on a reused card. Does diskutil list show any mounted partitions on that disk? If so, try using diskutil unmount on the partitions and retry.