[PATCH] Fix a crash in Dependency Analysis
kv.bhat at samsung.com
Wed Mar 4 07:49:57 PST 2015
Hi hfinkel, dblaikie, spop,
This crash is observed in Polybench/linear-algebra/solvers/dynprog in llvm lnt. The crash seems to be because of invalid memory access.
Memory corruption occurs when we access elements of Result->DV[SJ - 1]. This is because the ConstrainedLevels is based on Max Nesting Level and DVEntry in Result is based on Common Nesting levels between the 2 memory instructions which are being analyzed.
Memory corruption occurs when MaxLevels>CommonLevels and we access Result->DV[SJ - 1] to update direction based on constraints.
This patch adds a check to avoid memory corruption and conservatively exits the loop updating the direction when the above mentioned scenario occurs.
Please let me know your inputs on this patch.
Thanks and Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6002 bytes
Desc: not available
More information about the llvm-commits