On 02/20/2018 12:03 PM, Martin Sebor wrote: >> The thing that isn't handled conservatively is PHIs and COND_EXPR. >> The current code, if we can't figure one of the args out, for PHIs in >> fuzzy mode increases the *maxval value to +INF, but doesn't touch >> *minval, for COND_EXPR doesn't adjust the *minval/*maxval at all and just >> returns false. Unfortunately, changing that breaks > > It sounds like not setting *minlen is the problem then. Attached > is a slightly smaller patch that fixes the bug with no testsuite > regressions on x86_64-linux. How does it look to you? What I don't like here is that we ultimately continue to use the two operand get_range_strlen from the folder. Meaning we're asking for fuzzy results in a code generation path.
I'd lean more towards a solution that always gives conservatively correct results in the codegen path while allowing fuzzy on the warning paths. Jeff