Re: [PATCH] Fix IPA modref ubsan.

2021-11-19 Thread Martin Sebor via Gcc-patches
On 11/18/21 10:10 AM, Jan Hubicka wrote: I don't know what the guidance is on using vec in IPA passes but with respect to existing practice elsewhere, there are existing uses of vec and auto_vec with non-POD types and vec does work with them (see the vec_default_construct and vec_copy_construct

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Jan Hubicka via Gcc-patches
> > > I don't know what the guidance is on using vec in IPA passes > > > but with respect to existing practice elsewhere, there are > > > existing uses of vec and auto_vec with non-POD types and vec > > > does work with them (see the vec_default_construct and > > > vec_copy_construct templates,

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Martin Sebor via Gcc-patches
On 11/18/21 9:22 AM, Jan Hubicka wrote: On 11/18/21 5:41 AM, Jan Hubicka via Gcc-patches wrote: modref_tree::merge(modref_tree*, vec*, modref_parm_map*, bool) is called with modref_parm_map chain_map; The variable has uninitialized m.parm_offset_known and it is accessed here:

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Jan Hubicka via Gcc-patches
> On 11/18/21 5:41 AM, Jan Hubicka via Gcc-patches wrote: > > > modref_tree::merge(modref_tree*, > > > vec*, modref_parm_map*, bool) > > > > > > is called with modref_parm_map chain_map; > > > > > > The variable has uninitialized m.parm_offset_known and it is accessed > > > here: > > > > > >

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Martin Sebor via Gcc-patches
On 11/18/21 5:41 AM, Jan Hubicka via Gcc-patches wrote: modref_tree::merge(modref_tree*, vec*, modref_parm_map*, bool) is called with modref_parm_map chain_map; The variable has uninitialized m.parm_offset_known and it is accessed here: gcc/ipa-modref-tree.h:572 a.parm_offset_known &=

Re: [PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Jan Hubicka via Gcc-patches
> modref_tree::merge(modref_tree*, vec va_heap, vl_ptr>*, modref_parm_map*, bool) > > is called with modref_parm_map chain_map; > > The variable has uninitialized m.parm_offset_known and it is accessed > here: > > gcc/ipa-modref-tree.h:572 a.parm_offset_known &= m.parm_offset_known; > > Ready

[PATCH] Fix IPA modref ubsan.

2021-11-18 Thread Martin Liška
modref_tree::merge(modref_tree*, vec*, modref_parm_map*, bool) is called with modref_parm_map chain_map; The variable has uninitialized m.parm_offset_known and it is accessed here: gcc/ipa-modref-tree.h:572 a.parm_offset_known &= m.parm_offset_known; Ready to be installed after testing?