[cfe-dev] clang currently broken?
Ted Kremenek
kremenek at apple.com
Sat Oct 18 12:22:44 PDT 2008
On Oct 18, 2008, at 12:14 PM, Timo Sirainen wrote:
> Oh, there's a working valgrind for OS X?
Greg Parker (one of Apple's engineers in the debugging team) recently
released his patches to Valgrind. I included the URL in my other
email I sent a couple minutes ago.
>> What are the exact arguments you passed to clang?
>
> Nothing really. Either "ccc test2.c -o test" or just "clang test2.c".
>
> Anyway, looks like I figured it out:
>
> --- lib/AST/DeclGroup.cpp (revision 57766)
> +++ lib/AST/DeclGroup.cpp (working copy)
> @@ -54,7 +54,7 @@
> }
>
> void DeclGroup::Destroy(ASTContext& C) {
> - Decl** Decls = (Decl**) this + 1;
> + Decl** Decls = (Decl**) (this + 1);
>
> for (unsigned i = 0; i < NumDecls; ++i)
> Decls[i]->Destroy(C);
Wow. I'm very curious to know why that even works at all on Mac OS X.
Patch applied:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081013/008276.html
Thanks so much for diagnosing the bug!
More information about the cfe-dev
mailing list