Rework StackAddrLeakChecker to find stores of stack memory addresses to global variables
by inspecting the Store bindings instead of iterating over all the global variables in a translation unit. By looking at the store directly, we avoid cases where we cannot directly load from the global variable, such as an array (which can result in an assertion failure) and it also catches cases where we store stack addresses to non-scalar globals. Also, but not iterating over all the globals in the translation unit, we maintain cache locality, and the complexity of the checker becomes restricted to the complexity of the analyzed function, and doesn't scale with the size of the translation unit. This fixes PR 7383. llvm-svn: 106184
Loading
Please register or sign in to comment