Skip to content

[Mac OS X] Fix get_aligned_buf() crashes with ISOs - #19345

Merged
kd-11 merged 1 commit into
RPCS3:masterfrom
schm1dtmac:macosxiso
Aug 29, 2026
Merged

[Mac OS X] Fix get_aligned_buf() crashes with ISOs#19345
kd-11 merged 1 commit into
RPCS3:masterfrom
schm1dtmac:macosxiso

Conversation

@schm1dtmac

@schm1dtmac schm1dtmac commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This bug ticked me off as it causes the entire emulator to persistently crash on launch if any valid ISOs get read in ~/Library/Application Support/rpcs3/games/. Turns out it's another case of aligned allocations being downright broken on Mac OS X compared to other platforms so I copied over the existing workaround already used in aligned_malloc.hpp (dating back to PR #17800). Or maybe it's as simple as the size not being a multiple of the alignment, guh. Needs review from @kd-11.

@Megamouse

Copy link
Copy Markdown
Contributor

Looks like there already is a fix in
#19233

@digant73

Copy link
Copy Markdown
Contributor

@schm1dtmac it was fixed in #19233. you could possibly test that PR also for BD Drive support

Comment thread rpcs3/Loader/ISO.cpp Outdated

@kd-11 kd-11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

@kd-11
kd-11 merged commit eb61fc1 into RPCS3:master Aug 29, 2026
10 checks passed
@digant73

Copy link
Copy Markdown
Contributor

too late. anyway the * 2 was originally used on Windows just to align to 4096 (typical disk block size) but the BD block size (2048) is ok so we can also do the same on Linux and macos. I will apply the changes in #19233

@schm1dtmac
schm1dtmac deleted the macosxiso branch August 29, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants