r234767 - [CodeGen] Fix crash with duplicated mangled name.

Gao, Yunzhong yunzhong_gao at playstation.sony.com
Wed Apr 15 23:18:52 PDT 2015


Hi Argyrios and Renato,
Very sorry for the breakage.

I looked at the build log 4713 and saw two test failures:
FAIL: Clang::duplicate-mangled-name3.cpp
FAIL: LLVM::tail-call-mem-intrinsics.ll

It looks like the LLVM test (tail-call-mem-intrinsics.ll) also appeared in previous logs:
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/4712
and the test was later removed.

The new clang test failed on ARM because a "void func(void *)" function is named like a constructor and the clang codegen
is trying to emit a call to it. The ARMABIInfo expects the constructor to return a pointer to the class/struct, whereas the other
targets seem to ignore the return type. I can twist the test case to make it pass on ARM, but I do not have a good idea yet
of how to properly fix the issue. I was thinking maybe I need a way to call setInvalidDecl() when emitting the
duplicate-mangled-name error message, so that other parts of the clang codegen can check that field. The clang::GlobalDecl
wrapper does not allow me to modify the underlying Decl struct though.

Renato, you mentioned that new bugs were introduced silently by this patch. Are there other bugs that I should be aware of?

- Gao


________________________________________
From: Argyrios Kyrtzidis [akyrtzi at gmail.com]
Sent: Wednesday, April 15, 2015 7:34 AM
To: Gao, Yunzhong
Cc: Renato Golin; Clang Commits
Subject: Re: r234767 - [CodeGen] Fix crash with duplicated mangled name.

+ Yunzhong

> On Apr 15, 2015, at 1:50 AM, Renato Golin <renato.golin at linaro.org> wrote:
>
> I have reverted it for now, since new bugs have been introduced
> silently and this is the second time this week, we don't want to
> escalate.
>
> Let me know if you need help testing it next time.
>
> cheers,
> --renato
>
> On 15 April 2015 at 09:38, Renato Golin <renato.golin at linaro.org> wrote:
>> Hi,
>>
>> This patch broke all ARM bots:
>>
>> http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/4713
>>
>> static llvm::CastInst*
>> llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*,
>> llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion
>> `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
>>
>> Can you please have a look?
>>
>> cheers,
>> --renato

-------------- next part --------------
A non-text attachment was scrubbed...
Name: duplicate_mangle.patch
Type: text/x-patch
Size: 2604 bytes
Desc: duplicate_mangle.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150416/a0fec5ce/attachment.bin>


More information about the cfe-commits mailing list