mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-10-22 18:22:23 -09:00
When the Function Editor assigns parameter storage, PrototypePieces.firstVarArgSlot was always left at -1, causing VarargsFilter.filter() to unconditionally return false. Any .cspec rule using <varargs/> (e.g. MSP430's goto_stack for the last fixed arg) had no effect when storage was (re-)assigned via the UI. Fix: add a getStorageLocations overload that accepts an isVarArgs flag. When true, firstVarArgSlot is set to proto.intypes.size() — meaning all supplied parameters are non-optional and the first vararg slot follows immediately after the last one. FunctionData.updateParameterAndReturnStorage() now passes hasVarArgs to this overload, so VarargsFilter-based rules fire correctly. Fixes #9091 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>