[cfe-dev] stack overflow detection?

Kostya Serebryany kcc at google.com
Wed Sep 18 02:39:12 PDT 2013


I've filed https://code.google.com/p/address-sanitizer/issues/detail?id=224 for
the record.

--kcc


On Wed, Sep 18, 2013 at 12:45 PM, Kostya Serebryany <kcc at google.com> wrote:

>
>
>
> On Wed, Sep 18, 2013 at 12:30 PM, Chandler Carruth <chandlerc at google.com>wrote:
>
>>
>> On Wed, Sep 18, 2013 at 1:19 AM, Kostya Serebryany <kcc at google.com>wrote:
>>
>>> This can be solved with sigaltstack() and AddressSanitizer does this
>>> under a separate
>>> (experimental) flag ASAN_OPTIONS=use_sigaltstack=1
>>>
>>
>> Is there a bug tracking what is needed to enable this by default? Might
>> be a nice project for folks that want to improve support for this situation.
>>
>
> Not that I know of. There will be users who would not like this by
> default.
> sigaltstack in asan is not cheap -- it currently costs 32K RAM per thread.
> We have users with default 64K per thread stack and they set this strict
> limit for a good reason -- they have thousands of threads.
> So, adding 50% to their stack size is not great.
> remember that sigaltstack does not help to detect any new bugs -- it just
> makes the SEGV a bit more verbose.
>
> Having said that, I am actually not opposed to setting use_sigaltstack=1
> by default.
> It's just that we didn't spend much time evaluating it.
>
> --kcc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130918/e9e7fb30/attachment.html>


More information about the cfe-dev mailing list