Skip to content

fix missing semicolon after mi_track_done() (ETW build failure)#1330

Open
duchy wants to merge 1 commit into
microsoft:dev3from
DeepsightResearch:fix/mi-track-done-semicolon-dev3
Open

fix missing semicolon after mi_track_done() (ETW build failure)#1330
duchy wants to merge 1 commit into
microsoft:dev3from
DeepsightResearch:fix/mi-track-done-semicolon-dev3

Conversation

@duchy

@duchy duchy commented Jul 13, 2026

Copy link
Copy Markdown

mi_track_done() in mi_process_done() (src/init.c) is missing a trailing semicolon.

When ETW tracking is enabled (-DMI_TRACK_ETW=1), the macro expands to a real function call (EventUnregistermicrosoft_windows_mimalloc()), which then lacks a statement terminator. This causes a hard compile error
on MSVC:

src/init.c: error C2143: syntax error: missing ';' before 'if'

The bug is latent in the default build because without MI_TRACK_ETW, the macro expands to nothing, so no statement is
emitted and no semicolon is needed. It reproduces on VS2017/VS2019/VS2022 whenever ETW tracking is enabled.
Fix: add the missing ; terminator.

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.

1 participant