[LLVMbugs] [Bug 23086] New: __builtin_isnan(...) causes a segfault

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 31 08:35:40 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23086

            Bug ID: 23086
           Summary: __builtin_isnan(...) causes a segfault
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: charlesturner7c5 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14125
  --> https://llvm.org/bugs/attachment.cgi?id=14125&action=edit
clang-3.7: note: diagnostic msg: /tmp/bug-a187e8.sh

The following source file causes a segfault in trunk clang,

--------------8<--------------
__builtin_isnan(..._);
-------------->8--------------

bug.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
__builtin_isnan(...);
^
bug.c:1:17: error: ISO C requires a named parameter before '...'
__builtin_isnan(...);
                ^
0  libLLVMSupport.so.3.7       0x00007f69bfc5f648
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1  libLLVMSupport.so.3.7       0x00007f69bfc5e629
2  libc.so.6                   0x00007f69be419150
3  libclangSema.so.3.7         0x00007f69baa83c75
clang::Sema::MergeFunctionDecl(clang::FunctionDecl*, clang::NamedDecl*&, clang
::Scope*, bool) + 8165
4  libclangSema.so.3.7         0x00007f69baa954cf
clang::Sema::CheckFunctionDeclaration(clang::Scope*, clang::FunctionDecl*, cla
ng::LookupResult&, bool) + 1423
5  libclangSema.so.3.7         0x00007f69baa9cdf8
clang::Sema::ActOnFunctionDeclarator(clang::Scope*, clang::Declarator&, clang:
:DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&) + 1244
0
6  libclangSema.so.3.7         0x00007f69baa9ec00
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&, llvm::Mutable
ArrayRef<clang::TemplateParameterList*>) + 1680
7  libclangSema.so.3.7         0x00007f69baa9f345
clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) + 21
8  libclangParse.so.3.7        0x00007f69bb076924
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&
, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 100
9  libclangParse.so.3.7        0x00007f69bb085a91
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, clang::So
urceLocation*, clang::Parser::ForRangeInit*) + 1473
10 libclangParse.so.3.7        0x00007f69bb0f3cf1
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesW
ithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 273
11 libclangParse.so.3.7        0x00007f69bb0f43a9
12 libclangParse.so.3.7        0x00007f69bb0f43df
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 31
13 libclangParse.so.3.7        0x00007f69bb0f9523
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 259
14 libclangParse.so.3.7        0x00007f69bb0f9cd0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) +
44815 libclangParse.so.3.7        0x00007f69bb06a550
clang::ParseAST(clang::Sema&, bool, bool) + 400
16 libclangFrontend.so.3.7     0x00007f69bed45586
clang::FrontendAction::Execute() + 118
17 libclangFrontend.so.3.7     0x00007f69bed1c9d1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 289
18 libclangFrontendTool.so.3.7 0x00007f69beab0853
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1939
19 clang-3.7                   0x000000000040cb60 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1056
20 clang-3.7                   0x000000000040a9d8 main + 9976
21 libc.so.6                   0x00007f69be40476d __libc_start_main + 237
22 clang-3.7                   0x000000000040af21
Stack dump:
0.      Program arguments: /work/build-llvm-gitsvn/bin/clang-3.7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name bug.c -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -coverage-file /work/BUG20958/bug.c -resource-dir
/work/build-llvm-gitsvn/bin/../lib/clang/3.7.0 -internal-isystem
/usr/local/include -internal-isystem
/work/build-llvm-gitsvn/bin/../lib/clang/3.7.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /work/BUG20958 -ferror-limit 19 -fmessage-length 128
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics
-o bug.o -x c bug.c 
1.      bug.c:1:21: current parser token ';'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk 233677) (llvm/trunk 233674)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.7: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.

-- 
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/20150331/31bb12ae/attachment.html>


More information about the llvm-bugs mailing list