[llvm-dev] [RFC] ASan: patches to support 32-byte shadow granularity

Walter Lee via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 1 08:36:06 PDT 2017


Thanks Kostya for the feedback.

On Tue, Oct 31, 2017 at 6:00 PM Kostya Serebryany <kcc at google.com> wrote:

>
>> - Stack errors: it seems sensible not to insert 32-byte sentinels
>>   between every object, but the result is that some stack overflow
>>   gets reported as unknown or use-after-scope.  I have a patch that
>>   improves on the default behavior, but there remains cases where the
>>   error reports will not be as good.
>>
>
> Hmm. Not sure what's the problem here. It's totally fine to insert 32-byte
> redzone around stack objects.
> (in 32-byte granularity mode)
>

I was concerned about stack overhead, but I will go with your suggestion
for now, and revisit when I have more data.

>
>> - Would it make sense to provide an internal compiler flag to set the
>>   shadow granularity, so that there we can at least run the
>>   instrumentation tests for 32-byte granularity in normal builds?
>>
>
> I'd prefer a proper flag, like -fsanitize-address-granularity=N (8,16,32)
>

Ok I'll do that.


>
>>
>> - Is there a reasonable subset of tests I can port to 32-byte
>>   granularity to provide reasonable coverage, or should I aim to port
>>   all tests?
>>
>
> Let's see what tests won't work out of the box and decide.
> We can mark all failing tests as
>    UNSUPPORTED: 32-bit-granularity
> but ideally we shouldn't have to mark too many of those.
>

I will write up a classification of the failures.   There are many tests
that fail because they assume the shadow granularity; I will propose fixes
for them.

Thanks,

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171101/0e52ebdc/attachment.html>


More information about the llvm-dev mailing list