[all-commits] [llvm/llvm-project] 7ae5d0: Fix a stack overflow in ScalarEvolution.
Johannes Reifferscheid via All-commits
all-commits at lists.llvm.org
Wed Aug 3 02:08:18 PDT 2022
Author: Johannes Reifferscheid <jreiffers at google.com>
Date: 2022-08-03 (Wed, 03 Aug 2022)
Fix a stack overflow in ScalarEvolution.
Unfortunately, this overflow is extremely hard to reproduce reliably (in fact, I was unable to do so). The issue is that:
- getOperandsToCreate sometimes skips creating an SCEV for the LHS
- then, createSCEV is called for the BinaryOp
- ... which calls getNoWrapFlagsFromUB
- ... which under certain circumstances calls isSCEVExprNeverPoison
- ... which under certain circumstances requires the SCEVs of all operands
For certain deep dependency trees, this causes a stack overflow.
Reviewed By: bkramer, fhahn
Differential Revision: https://reviews.llvm.org/D129745
More information about the All-commits