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.

// spurious casts when trying to treat it like a VaList which
// has reference semantics.
if self.ast_context.is_va_list(target_cty.ctype) {
if self.ast_context.is_va_list(source_cty.ctype) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You are accounting for decay above on line 440, so why is this change needed?

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

2 participants