On Thu, Jun 11, 2015 at 09:42:38AM +0200, Bernd Edlinger wrote:
> it was exactly to the day one year ago, when I posted this patch the first 
> time:
> [PATCH] PR rtl-optimization/61047: 
> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00996.html
> 
> The PR was suspended, but the discussion did not stop.  And I personally 
> still see a bug like this
> as an in-acceptable security risk for embedded safety systems.
> 
> The problem is, that when rtx_addr_can_trap_p_1 returns 0, that means for the 
> code generation
> that this instruction can be moved out of any guarding if-block when that 
> seems profitable.
> 
> This is a latent wrong code generation bug, that happens mostly in machine 
> generated compiler-test code,
> but the point is, we can never be sure, that this is impossible to happen in 
> "real" code.
> 
> So I would like to fix this now, because there are quite a few duplicated 
> reports of the same
> bug already, and because refusing to fix a known wrong code bug is just not 
> our style.
> 
> 
> I have boot-strapped and regression tested the patch with all languages again 
> on x86_64-linux-gnu.
> The patch still works unmodified, and all I would have to change on the 
> original patch files
> will be the year: s/2014/2015/g ;)

IMHO the
#if 0
#endif
stuff doesn't belong to the patch.

Other than that, as I said already in the PR, I'm in favor of applying it to
the trunk (only, not release branches) and watching for performance and/or
wrong-code issues, but Eric is against it.  What do others think about it?

>From John Regehr's talk at GCC Summit a few years ago I got the
impression that for people to be able to effectively report bugs in the
compiler through code generator it is important that discovered bugs in the
compiler are fixed timely, otherwise it makes life to the reporters much
harder, because then they'll run into the same still unfixed issue all the
time.

> gcc/ChangeLog:
> 2014-06-11  Bernd Edlinger  <bernd.edlin...@hotmail.de>
> 
>       PR rtl-optimization/61047
>       * rtlanal.c (get_initial_register_offset): New function.
>       (rtx_addr_can_trap_p_1): Check offsets of stack references.
> 
> testsuite/ChangeLog:
> 2014-06-11  Bernd Edlinger  <bernd.edlin...@hotmail.de>
> 
>       PR rtl-optimization/61047
>       * gcc.c-torture/execute/20140611-1.c: New testcase.

        Jakub

Reply via email to