Skip to content

fix modern_memory_service on windows and macos - #38

Merged
siahisaforker merged 2 commits into
ExpansionPak:mainfrom
dougchansan:fix/modern-memory-test-portability
Oct 10, 2026
Merged

siahisaforker merged 2 commits into
ExpansionPak:mainfrom
dougchansan:fix/modern-memory-test-portability

Conversation

@dougchansan

Copy link
Copy Markdown
Contributor

fixes the three red llvm jobs on main.

  • windows (segfault): the fifo partial write called write_fifo_partial directly and read the 16-byte MGNativeMemoryResult from registers. win64 returns that struct through a hidden pointer, so args shifted and it crashed. it now goes through a moderngekko_write_fifo_partial c helper, same as read/write memory.
  • macos (link): the test's __asm__("func_...") labels missed the _ prefix. it now uses __USER_LABEL_PREFIX__.
  • msvc (compile): no asm labels there, so it uses /alternatename linker aliases.

all 35 tests pass locally on windows with clang, and the test compiles with msvc. macos is untested locally.

the fifo partial write called the service directly and read its 16-byte
result from registers, but win64 returns that struct through a hidden
pointer, so it segfaulted. call it through a c helper like read/write
memory do.

the test's asm labels also missed the macos symbol prefix and don't exist
on msvc; use __USER_LABEL_PREFIX__ there and a linker alias on msvc.
@siahisaforker
siahisaforker merged commit 02e27ac into ExpansionPak:main Oct 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants