You can check out ASan documentation on issue suppression:
https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-reports-in-external-libraries
But instead I would make sure the string in question is
NULL-terminated. Calling strlen() on non-terminated string may cause
your code crash in production.

On Tue, Feb 19, 2019 at 4:26 PM Hiren Shah <[email protected]> wrote:
>
> Hi,
>
> I am new to asan. I want to suppress strlen error.  I am getting following 
> backtrace which is aborting ASAN. I would like ASAN to skip that error.
>
>
> #3  0x00007fd8f5994288 in __sanitizer::Die() () from /lib64/libasan.so.4
>
> #4  0x00007fd8f5975275 in __asan::ReportGenericError(unsigned long, unsigned 
> long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) 
> ()
>
>    from /lib64/libasan.so.4
>
> #5  0x00007fd8f58dd3dd in __interceptor_strlen.part.24 () from 
> /lib64/libasan.so.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "address-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to