|
From: Andriy R. <ar...@bc...> - 2003-11-25 08:06:46
|
sorry, just found out that this patch breaks posix_memalign. It was ok for that small example but when I tried valgrind on my bigger project it seems like posix_memalign sets pointer to 0 and returns 22 (EINVAL), while valgrind w/out this patch or just w/valgrind altogether code works fine. I did not have much time to investigate it more, I allocate about 800*600*3/2 with align 16. If more info needed I'll try to take a look when it breaks. Andriy Nicholas Nethercote wrote: >On Fri, 14 Nov 2003, Andriy Rysin wrote: > > > >>Can anybody confirm this? It seems like valgrind does not handle >>posix_memalign, I saw __posix_memalign in the code but apparently it >>does not help. >> >> > >Can you add these lines: > > # define weak_alias(name, aliasname) \ > extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); > weak_alias(__posix_memalign, posix_memalign); > >just after __posix_memalign() (line 375) in coregrind/vg_replace_malloc.c? > >If it works, I'll commit it. > >Thanks. > >N > > |