Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-26 Thread Jakub Jelinek
On Mon, Feb 26, 2018 at 11:00:48AM +0100, Martin Liška wrote:
> On 02/14/2018 11:03 PM, Joseph Myers wrote:
> > On Wed, 14 Feb 2018, Jakub Jelinek wrote:
> > 
> >> 2018-02-13  Jakub Jelinek  
> >>
> >>PR sanitizer/84340
> >>* c-decl.c (build_compound_literal): Call pushdecl (decl) even when
> >>it is not TREE_STATIC.
> >>* c-typeck.c (c_mark_addressable) : Mark
> >>not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
> >>its COMPOUND_LITERAL_EXPR_DECL.
> > 
> > OK.
> > 
> 
> Jakub you probably forgot to install the patch. Can you please do it?

No, I was asking for ack for stage1, so it is waiting for GCC9.
This isn't really a regression and feels risky for GCC8 at this stage, might
break invalid programs that try to use compound literals after they go out
of scope.

Jakub


Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-26 Thread Martin Liška
On 02/26/2018 11:04 AM, Jakub Jelinek wrote:
> On Mon, Feb 26, 2018 at 11:00:48AM +0100, Martin Liška wrote:
>> On 02/14/2018 11:03 PM, Joseph Myers wrote:
>>> On Wed, 14 Feb 2018, Jakub Jelinek wrote:
>>>
 2018-02-13  Jakub Jelinek  

PR sanitizer/84340
* c-decl.c (build_compound_literal): Call pushdecl (decl) even when
it is not TREE_STATIC.
* c-typeck.c (c_mark_addressable) : Mark
not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
its COMPOUND_LITERAL_EXPR_DECL.
>>>
>>> OK.
>>>
>>
>> Jakub you probably forgot to install the patch. Can you please do it?
> 
> No, I was asking for ack for stage1, so it is waiting for GCC9.
> This isn't really a regression and feels risky for GCC8 at this stage, might
> break invalid programs that try to use compound literals after they go out
> of scope.
> 
>   Jakub
> 

Ah, I see!

Thanks,
Martin


Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-26 Thread Martin Liška
On 02/14/2018 11:03 PM, Joseph Myers wrote:
> On Wed, 14 Feb 2018, Jakub Jelinek wrote:
> 
>> 2018-02-13  Jakub Jelinek  
>>
>>  PR sanitizer/84340
>>  * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
>>  it is not TREE_STATIC.
>>  * c-typeck.c (c_mark_addressable) : Mark
>>  not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
>>  its COMPOUND_LITERAL_EXPR_DECL.
> 
> OK.
> 

Jakub you probably forgot to install the patch. Can you please do it?
Should I create a new test-case which you mentioned in previous email?

Martin


Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-14 Thread Joseph Myers
On Wed, 14 Feb 2018, Jakub Jelinek wrote:

> 2018-02-13  Jakub Jelinek  
> 
>   PR sanitizer/84340
>   * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
>   it is not TREE_STATIC.
>   * c-typeck.c (c_mark_addressable) : Mark
>   not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
>   its COMPOUND_LITERAL_EXPR_DECL.

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com