This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, PR 57748] Check for out of bounds access


> While it is straight forward to remove the movmisalign path in 4.9 and 4.8,
> this is not so simple in the 4.7 branch. The reason is that 4.7 uses
> "to_rtx = expand_normal (tem);" while 4.8 and 4.9 use
> "to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);"
> which does almost the same, but returns the misaligned rtx instead of
> an register with the value of the structure. And the generated code without
> the misalign path fails simply because the assignment goes to the register
> instead of the structure.
> 
> So the problem is: there is no EXPAND_WRITE/EXPAND_MEMORY in 4.7...
> 
> A possible patch for 4.7 would be like the attached (untested) patch.

Let's simply declare this as WONTFIX on the 4.7 branch.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]