[LLVMbugs] [Bug 17371] New: [-cxx-abi microsoft] Calling convention mismatch for operator new/delete and potentially others
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Sep 25 13:43:12 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17371
Bug ID: 17371
Summary: [-cxx-abi microsoft] Calling convention mismatch for
operator new/delete and potentially others
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: rnk at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
richard-llvm at metafoo.co.uk
Classification: Unclassified
This is a link error when building SupportTests with clang-cl /fallback.
The mismatch looks like this:
$ dumpbin /symbols lib/IR/CMakeFiles/LLVMCore.dir/User.cpp.obj
unittests/Support/CMakeFiles/SupportTests.dir/ValueHandleTest.cpp.obj | grep
'User::operator new'
14A 00000180 SECT1 notype () External | ??2User at llvm@@KEPAXII at Z
(protected: static void * __thiscall llvm::User::operator new(unsigned
int,unsigned int))
B9A 00000000 UNDEF notype () External | ??2User at llvm@@KAPAXII at Z
(protected: static void * __cdecl llvm::User::operator new(unsigned
int,unsigned int))
The key diff is __thiscall vs. __cdecl.
This is a bug in the calling convention change I committed. Since operator new
is declared in a record context, we assume it's __thiscall, even though it has
no this pointer. I assume we have a similar problem for delete, and maybe
other operators that I'm unaware of.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130925/13241691/attachment.html>
More information about the llvm-bugs
mailing list