[PR #17644] Potential hotfix for a MSVC 14.40.33807 miscompilation #31307

Closed
opened 2026-01-31 09:46:28 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/17644

State: closed
Merged: Yes


We aren't sure what exactly it is, but on the latest toolchain
this code miscompiles. The fmt call throws an exception because
it supposedly has too few arguments supplied for the format string.
Debugging the issue shows that the next_arg_id_ internal to fmt
is 10000, even though it's parsing the first argument. At that point
it's supposed to be 0. This code hasn't been changed in years.

My hope is that this slight shuffling of the code causes
the issue to go away.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/17644 **State:** closed **Merged:** Yes --- We aren't sure what exactly it is, but on the latest toolchain this code miscompiles. The fmt call throws an exception because it supposedly has too few arguments supplied for the format string. Debugging the issue shows that the `next_arg_id_` internal to `fmt` is 10000, even though it's parsing the first argument. At that point it's supposed to be 0. This code hasn't been changed in years. My hope is that this slight shuffling of the code causes the issue to go away.
claunia added the pull-request label 2026-01-31 09:46:28 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31307