This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [asan] Patch - fix an ICE in asan.c


Tobias Burnus wrote:
So untested:

Thanks for the patch! It fixed the problem half way: It fixes the second issue I had (fail10.ii, http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00791.html ).


However, it didn't fix the original problem: As the call for strlen directly returns, it never reaches your patch. Hence, it doesn't fix fail31.ii of http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00786.html

If one uses the same line for strlen, it works.

I spoke too early. With the updated patch, there is no ICE, but one crashes for the following valid program with:


==27313== ERROR: AddressSanitizer crashed on unknown address 0x13fffe8fc737 (pc 0x0000004008e3 sp 0x7fffa3f1c6d0 bp 0x7fffa3f1c700 T0)
AddressSanitizer can not provide additional info.



The crucial part is the "strlen" call.



#include <stdio.h> #include <string.h>

int main(int argc, char *argv[])
{
 int i;
 for (i = 0; i < argc; i++)
   {
     printf("%d: '%s':%zd\n", i, argv[i], strlen(argv[i]));
   }
 return 0;
}


Tobias



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]