<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Assertion failure in clang::ASTContext::adjustExceptionSpec"
href="https://bugs.llvm.org/show_bug.cgi?id=41835">41835</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failure in clang::ASTContext::adjustExceptionSpec
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>miyuki-llvm@miyuki.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Starting with
commit 8ad70e473414cc639f35b6e61ed3af1db334d845
Author: Leonard Chan <<a href="mailto:leonardchan@google.com">leonardchan@google.com</a>>
Date: Tue May 7 03:20:17 2019 +0000
Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an
attribute declaration"
Updated with fix for read of uninitialized memory.
git-svn-id: <a href="https://llvm.org/svn/llvm-project/cfe/trunk@360109">https://llvm.org/svn/llvm-project/cfe/trunk@360109</a>
91177308-0d34-0410-b5e6-96231b3b80d8
The following code causes an assertion failure:
$ cat test.cc
#define _LIBCPP_FLOAT_ABI __attribute__((pcs("aapcs")))
struct A {
_LIBCPP_FLOAT_ABI int operator()() throw();
};
$ clang -target arm -mfloat-abi=soft -fsyntax-only test.cc
clang-9:
/tmp/plgbuild/abs_build/784414_36738/trunk/work/src/llvm/tools/clang/lib/AST/ASTContext.cpp:2807:
void clang::ASTContext::adjustExceptionSpec(clang::FunctionDecl*, const
clang::FunctionProtoType::ExceptionSpecInfo&, bool): Assertion
`TypeLoc::getFullDataSizeForType(Updated) ==
TypeLoc::getFullDataSizeForType(TSInfo->getType()) && "TypeLoc size mismatch
from updating exception specification"' failed.
Stack dump:
0. Program arguments:
/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9 -cc1
-triple armv4t-- -fsyntax-only -disable-free -main-file-name test.cc
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -target-cpu arm7tdmi -target-feature
+soft-float -target-feature +soft-float-abi -target-feature -fp-only-sp
-target-feature -d16 -target-feature -vfp2 -target-feature -vfp3
-target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8
-target-feature -neon -target-feature -crypto -target-feature +strict-align
-target-abi aapcs -msoft-float -mfloat-abi soft
-fallow-half-arguments-and-returns -dwarf-column-info -debugger-tuning=gdb
-resource-dir
/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/lib/clang/9.0.0
-fdeprecated-macro -fdebug-compilation-dir /work/ONT-libcxx-fail -ferror-limit
19 -fmessage-length 239 -fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -x c++ test.cc
-faddrsig
1. <eof> parser at end of file
2. test.cc:2:1: parsing struct/union/class body 'A'
#0 0x00000000026f1cfa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x26f1cfa)
#1 0x00000000026efb14 llvm::sys::RunSignalHandlers()
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x26efb14)
#2 0x00000000026efc42 SignalHandler(int)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x26efc42)
#3 0x00007f7e508ac390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f7e4f418428 raise
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f7e4f41a02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f7e4f410bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007f7e4f410c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x00000000042e3f1f
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x42e3f1f)
#9 0x0000000003e22ab5
clang::Sema::actOnDelayedExceptionSpecification(clang::Decl*,
clang::ExceptionSpecificationType, clang::SourceRange,
llvm::ArrayRef<clang::OpaquePtr<clang::QualType> >,
llvm::ArrayRef<clang::SourceRange>, clang::Expr*)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3e22ab5)
#10 0x0000000003b6514f
clang::Parser::ParseLexedMethodDeclaration(clang::Parser::LateParsedMethodDeclaration&)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b6514f)
#11 0x0000000003b5e162
clang::Parser::ParseLexedMethodDeclarations(clang::Parser::ParsingClass&)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b5e162)
#12 0x0000000003b8ff1d
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b8ff1d)
#13 0x0000000003b91fc5
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b91fc5)
#14 0x0000000003b78ab2
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b78ab2)
#15 0x0000000003b5634f
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b5634f)
#16 0x0000000003b56c49
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.217)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b56c49)
#17 0x0000000003b5aa90
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b5aa90)
#18 0x0000000003b5bec9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b5bec9)
#19 0x0000000003b5c247
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b5c247)
#20 0x0000000003b51d76 clang::ParseAST(clang::Sema&, bool, bool)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x3b51d76)
#21 0x0000000002d8b3ee clang::FrontendAction::Execute()
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x2d8b3ee)
#22 0x0000000002d4e346
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x2d4e346)
#23 0x0000000002e2e5a5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0x2e2e5a5)
#24 0x0000000000b958f0 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0xb958f0)
#25 0x0000000000b11e42 main
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0xb11e42)
#26 0x00007f7e4f403830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#27 0x0000000000b91669 _start
(/arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin/clang-9+0xb91669)
clang-9: error: unable to execute command: Aborted (core dumped)
clang-9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.0
Target: arm
Thread model: posix
InstalledDir: /arm/warehouse/OpenSource/llvm/0.0/2084/linux-x86_64-high-rel/bin</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>