On Mon, May 06, 2013 at 08:52:21PM +0200, Christophe Lyon wrote:
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -281,6 +281,8 @@ static unsigned arm_add_stmt_cost (void *data, int count,
> 
>  static void arm_canonicalize_comparison (int *code, rtx *op0, rtx *op1,
>                       bool op0_preserve_value);
> +static unsigned HOST_WIDE_INT arm_asan_shadow_offset (void);
> +

Unnecessary extra line?

> --- a/gcc/testsuite/c-c++-common/asan/heap-overflow-1.c
> +++ b/gcc/testsuite/c-c++-common/asan/heap-overflow-1.c
> @@ -25,7 +25,7 @@ int main(int argc, char **argv) {
> 
>  /* { dg-output "READ of size 1 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */
>  /* { dg-output "    #0 0x\[0-9a-f\]+ (in _*main
> (\[^\n\r]*heap-overflow-1.c:21|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
> -/* { dg-output "0x\[0-9a-f\]+ is located 0 bytes to the right of
> 10-byte region\[^\n\r]*(\n|\r\n|\r)" } */
> -/* { dg-output "allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */
> +/* { dg-output ".*0x\[0-9a-f\]+ is located 0 bytes to the right of
> 10-byte region\[^\n\r]*(\n|\r\n|\r)" } */
> +/* { dg-output ".*allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */

Please avoid .* whenever possible, in dejagnu that includes newlines.
So, use \[^\n\r]* instead unless it prints extra lines.
Repeated many times through the patch.

> --- a/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
> +++ b/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
> @@ -27,7 +27,7 @@ const char *StripPathPrefix(const char *filepath,
>  uptr StackTrace::GetPreviousInstructionPc(uptr pc) {
>  #ifdef __arm__
>    // Cancel Thumb bit.
> -  pc = pc & (~1);
> +  return pc & (~1);
>  #endif
>  #if defined(__powerpc__) || defined(__powerpc64__)
>    // PCs are always 4 byte aligned.

And this change needs to be merged from upstream libsanitizer.

        Jakub

Reply via email to