[PATCH, libstdc++] Make empty std::string storage readonly

Michael Haubenwallner michael.haubenwallner@salomon.at
Tue Oct 30 09:25:00 GMT 2012


On 08/30/2012 11:45 AM, Jonathan Wakely wrote:
> On 29 August 2012 13:25, Michael Haubenwallner wrote:
>> On 08/28/2012 08:12 PM, Jonathan Wakely wrote:
>>> On 28 August 2012 18:27, Michael Haubenwallner wrote:
>>>>>
>>>>> Does it actually produce a segfault? I suppose it might on some
>>>>> platforms, but not all, so I'm not sure it's worth changing.
>>
>> Using this patch on my x86_64 Gentoo Linux Desktop with gcc-4.7.1 does segfault
>> as expected - when I make sure the correct libstdc++ is used at runtime,
>> having the '_S_empty_rep_storage' symbol in the .rodata section rather than .bss.
> 
> If it works reliably on x86_64 then I think the patch is worth considering.
> 
> I'm on holiday for a week, so maybe one of the other maintainers will
> deal with it first.

Any chance to get this in for 4.8?

Thank you!
/haubi/



More information about the Gcc-patches mailing list