Re: [PATCH] Fix out-of-bounds write in RTL function reader (PR bootstrap/79952)

2017-03-10 Thread Bernd Schmidt
On 03/10/2017 08:03 PM, David Malcolm wrote: print-rtl.c:rtx_writer::print_rtx_operand_code_0 has some special -casing for SYMBOL_REF, but if I'm reading things right we don't yet dump SYMBOL_REF_BLOCK and SYMBOL_REF_BLOCK_OFFSET, so we'd need to dump these somehow. Yeah. Perhaps as an extra ta

Re: [PATCH] Fix out-of-bounds write in RTL function reader (PR bootstrap/79952)

2017-03-10 Thread David Malcolm
On Fri, 2017-03-10 at 00:36 +0100, Bernd Schmidt wrote: > On 03/09/2017 08:28 PM, David Malcolm wrote: > > The root cause is an out-of-bounds memory write in the RTL dump > > reader when handling SYMBOL_REFs with SYMBOL_FLAG_HAS_BLOCK_INFO > > set. > > > > Such SYMBOL_REFs are normally created by

Re: [PATCH] Fix out-of-bounds write in RTL function reader (PR bootstrap/79952)

2017-03-09 Thread Bernd Schmidt
On 03/09/2017 08:28 PM, David Malcolm wrote: The root cause is an out-of-bounds memory write in the RTL dump reader when handling SYMBOL_REFs with SYMBOL_FLAG_HAS_BLOCK_INFO set. Such SYMBOL_REFs are normally created by varasm.c:create_block_symbol, which has: Hmm, I don't actually recall seei

[PATCH] Fix out-of-bounds write in RTL function reader (PR bootstrap/79952)

2017-03-09 Thread David Malcolm
PR bootstrap/79952 identifies a crash that can occur when running -fself-test. The root cause is an out-of-bounds memory write in the RTL dump reader when handling SYMBOL_REFs with SYMBOL_FLAG_HAS_BLOCK_INFO set. Such SYMBOL_REFs are normally created by varasm.c:create_block_symbol, which has: