<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Crash on class containing function named free()"
   href="https://llvm.org/bugs/show_bug.cgi?id=24893">24893</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash on class containing function named free()
          </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>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jeanmichael.celerier@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14918" name="attach_14918" title="A file that crashes">attachment 14918</a> <a href="attachment.cgi?id=14918&action=edit" title="A file that crashes">[details]</a></span>
A file that crashes

I get the following stack trace with the given attachment and clang3.7 (asked
on IRC and it's the case on latest trunk too).

  % clang++-3.7 -std=c++14 test.cpp
0  libLLVM-3.7.so.1 0x00007f8957d5735d
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 45
1  libLLVM-3.7.so.1 0x00007f8957d56961
2  libpthread.so.0  0x00007f89566178d0
3  clang            0x0000000001288478 clang::Expr::IgnoreParens() + 8
4  clang            0x00000000012890ad clang::Expr::IgnoreParenImpCasts() + 13
5  clang            0x0000000000c23c29
6  clang            0x0000000000c24137
7  clang            0x0000000000c3a29c
8  clang            0x0000000000c3b528
clang::Sema::ActOnCXXDelete(clang::SourceLocation, bool, bool, clang::Expr*) +
264
9  clang            0x0000000000dc3f5d
10 clang            0x0000000000dc03dc
11 clang            0x0000000000dce10d
12 clang            0x0000000000dcf543
13 clang            0x0000000000dcf65b
14 clang            0x0000000000dce435
15 clang            0x0000000000dd194f clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 79
16 clang            0x0000000000de4a57
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 3687
17 clang            0x0000000000de4cca
clang::Sema::PerformPendingInstantiations(bool) + 282
18 clang            0x0000000000a97866 clang::Sema::ActOnEndOfTranslationUnit()
+ 278
19 clang            0x00000000009f0bc9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 553
20 clang            0x00000000009e62ab clang::ParseAST(clang::Sema&, bool,
bool) + 459
21 clang            0x00000000006858be clang::FrontendAction::Execute() + 478
22 clang            0x000000000065deb9
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 297
23 clang            0x0000000000645e83
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1907
24 clang            0x0000000000640b30 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2256
25 clang            0x000000000063d60f main + 975
26 libc.so.6        0x00007f895517cb45 __libc_start_main + 245
27 clang            0x000000000063fbe4
Stack dump:
0.    Program arguments: /usr/lib/llvm-3.7/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-main-file-name test.cpp -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version
2.25.1 -dwarf-column-info -resource-dir
/usr/lib/llvm-3.7/bin/../lib/clang/3.7.0 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/c++/5.2.1
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/x86_64-linux-gnu/c++/5.2.1
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/x86_64-linux-gnu/c++/5.2.1
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/c++/5.2.1/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/llvm-3.7/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 -std=c++14 -fdeprecated-macro
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 135
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/test-f3fc53.o -x c++
test.cpp 
1.    <eof> parser at end of file
2.    test.cpp:11:14: instantiating function definition 'free'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Debian clang version 3.7.0-2 (tags/RELEASE_370/final) (based on LLVM 3.7.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://bugs.debian.org/">http://bugs.debian.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/test-de646a.cpp
clang: note: diagnostic msg: /tmp/test-de646a.sh
clang: note: diagnostic msg: 

********************
[1]    12952 exit 254   clang++-3.7 -std=c++14 test.cpp</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>