C++: Also add MSVC-related 'alloca'-like functions.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-11-15 12:07:17 +00:00
parent ec63099c54
commit bae7e10e46

View File

@@ -44,7 +44,7 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration {
// `source` is an instruction that represents the return value of a // `source` is an instruction that represents the return value of a
// function that is known to return stack-allocated memory. // function that is known to return stack-allocated memory.
exists(Call call | exists(Call call |
call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa"]) and call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa", "_alloca", "_malloca"]) and
source.getUnconvertedResultExpression() = call source.getUnconvertedResultExpression() = call
) )
) )