On 11/23/2016 01:09 PM, Martin Sebor wrote:

I hadn't thought of extending the gimple-ssa-sprintf pass to all
the memxxx and strxxx builtins.  The _chk functions are already
being handled in builtins.c so calling compute_builtin_object_size
for the non-checking ones there and detecting overflow in those
was an easy and, I had hoped, non-controversial enhancement to make.
In a discussion of bug 77784 (handled in the patch for bug 53562)
Jakub also expressed a preference for some of the diagnostics
staying in builtins.c.
I'm just trying to understand how the pieces fit together. I wasn't aware of Jakub's desire to keep them in builtins.c.


I also suspect that the answer to your question is yes.  Range
information is pretty bad in the gimple-ssa-sprintf pass (it looks
like it runs after EVRP but before VRP).  Maybe the pass should run
after VRP?
Let's investigate this separately rather than draw in additional potential issues. But I do think this is worth investigation.


That said, I defer to you on how to proceed here.  I'm prepared
to do the work(*) but I do worry about jeopardizing the chances
of this patch and the others making it into 7.0.
So would it make sense to just init/fini the b_o_s framework in your pass and for builtin expansion?

PS If I understand what you are suggesting this would mean
extending the gimple-ssa-sprintf pass to the memxxx and strxxx
functions and running the pass later, after VRP.
That was my original thought, but I'm certainly not deeply vested in it -- it was primarily to avoid initializing b_o_s an extra time.

Jeff

Reply via email to