[LLVMbugs] [Bug 9381] New: Crash while compiling minimal boost::regex_match program.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 2 15:07:27 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9381
Summary: Crash while compiling minimal boost::regex_match
program.
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: henrik at mysko.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
clang++ crashes while instantiating the boost::regex_match template for a
minimal example. The code is as followed (preprocessed example is attached):
----
#include <boost/regex.hpp>
int main()
{
return boost::regex_match("lalabc", boost::regex(".*abc")) ? 0 : 1;
}
----
clang crashes with the following output:
0 clang 0x00000000018f57af
1 clang 0x00000000018f62ea
2 libpthread.so.0 0x00007f0c15244c80
3 clang 0x0000000000dd291a
clang::NestedNameSpecifier::print(llvm::raw_ostream&, clang::PrintingPolicy
const&) const + 26
4 clang 0x0000000000e02d41
clang::TemplateName::print(llvm::raw_ostream&, clang::PrintingPolicy const&,
bool) const + 705
5 clang 0x0000000000e12f50
6 clang 0x0000000000e1653f
7 clang 0x0000000000e1b50d
8 clang 0x0000000000e16057
9 clang 0x0000000000e15ad1
10 clang 0x0000000000e17d54
clang::QualType::getAsStringInternal(clang::Type const*, clang::Qualifiers,
std::string&, clang::PrintingPolicy const&) + 964
11 clang 0x0000000000998636
clang::QualType::getAsStringInternal(std::string&, clang::PrintingPolicy
const&) const + 86
12 clang 0x0000000000da9048
clang::PredefinedExpr::ComputeName(clang::PredefinedExpr::IdentType,
clang::Decl const*) + 2456
13 clang 0x0000000000b2fe0e
14 clang 0x0000000000b41ab9
15 clang 0x0000000000b448e5
16 clang 0x0000000000b449f1
17 clang 0x0000000000b30ff5
18 clang 0x0000000000b3f008
19 clang 0x0000000000b30135
20 clang 0x0000000000b49032
21 clang 0x0000000000b30d55
22 clang 0x0000000000b3fd7d
23 clang 0x0000000000b418cd
24 clang 0x0000000000b3ffa0
25 clang 0x0000000000b41a2d clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 45
26 clang 0x0000000000b55fd0
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 1280
27 clang 0x0000000000b55826
clang::Sema::PerformPendingInstantiations(bool) + 310
28 clang 0x0000000000b562e4
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2068
29 clang 0x0000000000b55826
clang::Sema::PerformPendingInstantiations(bool) + 310
30 clang 0x0000000000b562e4
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2068
31 clang 0x0000000000b55826
clang::Sema::PerformPendingInstantiations(bool) + 310
32 clang 0x0000000000b562e4
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2068
33 clang 0x0000000000b55826
clang::Sema::PerformPendingInstantiations(bool) + 310
34 clang 0x000000000092fac2 clang::Sema::ActOnEndOfTranslationUnit()
+ 306
35 clang 0x00000000008e44f9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 217
36 clang 0x00000000008c2cb0 clang::ParseAST(clang::Sema&, bool) + 128
37 clang 0x000000000077f7c4 clang::CodeGenAction::ExecuteAction() +
68
38 clang 0x000000000066b95b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 347
39 clang 0x00000000006473ca
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1130
40 clang 0x000000000063d2e3 cc1_main(char const**, char const**, char
const*, void*) + 691
41 clang 0x00000000006463fc main + 5020
42 libc.so.6 0x00007f0c14508efe __libc_start_main + 254
43 clang 0x000000000063ce49
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
regex_test.cpp -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.21.0.20110216 -momit-leaf-frame-pointer -resource-dir
/usr/local/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 238
-fcxx-exceptions -fexceptions -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/cc-R8AAz3.o -x c++ regex_test.cpp
1. <eof> parser at end of file
2. /usr/include/boost/regex/v4/regex_match.hpp:85:13: instantiating function
definition 'regex_match'
3. /usr/include/boost/regex/v4/regex_match.hpp:44:6: instantiating function
definition 'regex_match'
4. /usr/include/boost/regex/v4/perl_matcher.hpp:362:4: instantiating
function definition 'perl_matcher'
5. /usr/include/boost/regex/v4/basic_regex.hpp:660:49: instantiating
function definition 'get_traits'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list