[PATCH][PR lto/79042] Propagate node->dynamically_initialized bit for varpool node to LTRANS stage.

Maxim Ostapenko m.ostapenko@samsung.com
Wed Jan 11 11:21:00 GMT 2017


On 11/01/17 14:17, Richard Biener wrote:
> On Wed, Jan 11, 2017 at 10:00 AM, Maxim Ostapenko
> <m.ostapenko@samsung.com> wrote:
>> Hi,
>>
>> as mentioned in PR, LTO doesn't propagate node->dynamically_initialized bit
>> for varpool nodes that leads to ASan fails to detect initialization order
>> fiasco even for trivial example (e.g. from here:
>> https://github.com/google/sanitizers/wiki/AddressSanitizerExampleInitOrderFiasco).
>> This trivial patch fixes the issue. Regtested on x86_64-unknown-linux-gnu,
>> OK for mainline?
> Ok.  This is also needed on branches, correct?

Yes, branches also need this. gcc-5-branch and gcc-6-branch, right?

Thanks,
-Maxim

>
> Richard.
>
>> -Maxim
>



More information about the Gcc-patches mailing list