Skip to content

Conversation

@Rua
Copy link
Contributor

@Rua Rua commented Oct 30, 2025

This reworks the implementation of is_va_list, so that it is more accurate (less false positives/negatives). It's split into two subfunctions, one that detects va_list based on the __builtin_va_list typedef, and the other that detects based on the architecture-specific struct definition. Both methods have situations in which they don't work, so they are used together.

This has been confirmed to work on:

  • Linux x86-64
  • Linux x86-32 (was previously broken)

MacOS aarch64 is still failing if I enable it, because things like va_start seem to be unimplemented. Testing for Linux aarch64 will depend on #1283.

@Rua Rua force-pushed the va-list-fix branch 2 times, most recently from 1100792 to f669150 Compare October 31, 2025 09:59
Copy link
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Can you add the example from #1353 as a snapshot test? You can do that as a commit after the fixes, as prior to the fix, it wouldn't compile (if I'm understanding that correctly). Thanks!

@Rua
Copy link
Contributor Author

Rua commented Nov 16, 2025

It was only broken for x86-32, which the tests wouldn't catch anyway. Also since the same thing was suggested in #1443 (review) I'll go with that one instead.

Copy link
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

It was only broken for x86-32, which the tests wouldn't catch anyway. Also since the same thing was suggested in #1443 (review) I'll go with that one instead.

Ah, sounds good to me.

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.

va_start type mismatch

3 participants