https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84732

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> (In reply to Martin Liška from comment #2)
> > I guess it somehow confuses VRP, Martin can you please take a look? Note
> > that __builtin___sanitizer_cov_trace_pc is pure function, can't modify
> > memory in original program.
> 
> No, __builtin___sanitizer_cov_trace_pc is certainly not pure and can't
> really be, otherwise would optimize them all away (nothing uses their void
> return value),
> so the problem is that it invalidates all recorded string lengths, at least
> those that escape (but in this testcase it is a global variable).
> As __sanitizer_cov_trace_pc is a user-supplied function, I don't really
> think we can assume anything on it (e.g. that it will not change any global
> or escaped local variables, it can change them and most likely will do at
> least some of them, otherwise it would be useless).

I see, I was probably too eager :)

Reply via email to