[compiler-rt] r230019 - [ASan] Make the argument of '__sanitizer_annotate_contiguous_container' is not aligned error message easier to understand

Renato Golin renato.golin at linaro.org
Tue Feb 24 12:21:30 PST 2015


I found the problem...

On 20 February 2015 at 15:45, Timur Iskhodzhanov <timurrrr at google.com> wrote:
> +  if (!IsAligned(beg, SHADOW_GRANULARITY))
> +    Report("ERROR: beg is not aligned by %d\n", SHADOW_GRANULARITY);

This has to be implemented in the same way as the original check:

    uptr granularity = SHADOW_GRANULARITY;
    Report("ERROR: beg is not aligned by %d\n", granularity);

The reason being that macros are expanded differently in different
architectures and the sizes, types and va_arg assumptions will break.

Timur,

I tested the change on my ARM machine and it prints the correct
message, "aligned by 8". Feel free to reapply the patch with that
modification.

cheers,
--renato



More information about the llvm-commits mailing list