<html>
    <head>
      <base href="http://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 --- - Compilation crashes with floating point exception 8"
   href="http://llvm.org/bugs/show_bug.cgi?id=16823">16823</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compilation crashes with floating point exception 8
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>stone@cs.hmc.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11000" name="attach_11000" title="The test program causing the exception">attachment 11000</a> <a href="attachment.cgi?id=11000&action=edit" title="The test program causing the exception">[details]</a></span>
The test program causing the exception

clang++ crashes when compiling a small test program, reporting floating point
exception 8. 

The original problem I was having (compiling a much larger program) was an
assert failure:

"Assertion failed: (FF.getValueSize() && "Invalid virtual align in concrete
fragment!"), function writeFragment, file
/Users/stone/Documents/shared/research/ocm/llvm-based/llvmcore/llvm/lib/MC/MCAssembler.cpp,
line 639."

in the process of stripping the input down, the assertion failure disappeared,
replaced by this floating point exception. With any luck, it's the same bug.



%
/Users/stone/Documents/shared/research/ocm/llvm-based/llvmcore/installed/bin/clang++
-c src/api/wlpdstm.cc

0  clang             0x000000010fc9492e llvm::sys::PrintStackTrace(__sFILE*) +
46
1  clang             0x000000010fc94c3b PrintStackTraceSignalHandler(void*) +
27
2  clang             0x000000010fc94f49 SignalHandler(int) + 297
3  libsystem_c.dylib 0x00007fff85dc694a _sigtramp + 26
4  libsystem_c.dylib 0x00007fff52cadc70 _sigtramp + 3438179136
5  clang             0x000000010f9f44d0
llvm::MCAssembler::writeSectionData(llvm::MCSectionData const*,
llvm::MCAsmLayout const&) const + 1104
6  clang             0x000000010fa3e3db
llvm::MachObjectWriter::WriteObject(llvm::MCAssembler&, llvm::MCAsmLayout
const&) + 2379
7  clang             0x000000010f9f5910 llvm::MCAssembler::Finish() + 1584
8  clang             0x000000010fa2d56e llvm::MCObjectStreamer::FinishImpl() +
142
9  clang             0x000000010fa23eb2 (anonymous
namespace)::MCMachOStreamer::FinishImpl() + 722
10 clang             0x000000010fa33f2e llvm::MCStreamer::Finish() + 110
11 clang             0x000000010f286dac
llvm::AsmPrinter::doFinalization(llvm::Module&) + 3020
12 clang             0x000000010fbeaf8c
llvm::FPPassManager::doFinalization(llvm::Module&) + 92
13 clang             0x000000010fbeb43e
llvm::MPPassManager::runOnModule(llvm::Module&) + 1134
14 clang             0x000000010fbebaae
llvm::PassManagerImpl::run(llvm::Module&) + 302
15 clang             0x000000010fbebd41 llvm::PassManager::run(llvm::Module&) +
33
16 clang             0x000000010d20548c (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
llvm::raw_ostream*) + 1212
17 clang             0x000000010d204f61
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 97
18 clang             0x000000010d3760b8
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1000
19 clang             0x000000010d40ded8 clang::ParseAST(clang::Sema&, bool,
bool) + 792
20 clang             0x000000010d03454e
clang::ASTFrontendAction::ExecuteAction() + 334
21 clang             0x000000010d3751e2 clang::CodeGenAction::ExecuteAction() +
1266
22 clang             0x000000010d03407f clang::FrontendAction::Execute() + 191
23 clang             0x000000010cff5270
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 896
24 clang             0x000000010cf610d4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1028
25 clang             0x000000010cf4ebe7 cc1_main(char const**, char const**,
char const*, void*) + 711
26 clang             0x000000010cf5b82c main + 540
27 libdyld.dylib     0x00007fff8bbd47e1 start + 0
28 libdyld.dylib     0x0000000000000032 start + 1950529617
Stack dump:
0.    Program arguments:
/Users/stone/Documents/shared/research/ocm/llvm-based/llvmcore/installed/bin/clang
-cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free
-main-file-name wlpdstm.cc -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 136 -coverage-file
/Users/stone/research/ocm/llvm-based/stms/www/wlpdstm.o -resource-dir
/Users/stone/Documents/shared/research/ocm/llvm-based/llvmcore/installed/bin/../lib/clang/3.4
-fdeprecated-macro -fdebug-compilation-dir
/Users/stone/research/ocm/llvm-based/stms/www -ferror-limit 19 -fmessage-length
106 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o wlpdstm.o -x c++ src/api/wlpdstm.cc 
1.    <eof> parser at end of file
2.    Code generation
clang: error: unable to execute command: Floating point exception: 8
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 187836)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</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:
/var/folders/yn/02xs1zjx4ylg_j3vxkm6myrh0000gn/T/wlpdstm-0d741b.cpp
clang: note: diagnostic msg:
/var/folders/yn/02xs1zjx4ylg_j3vxkm6myrh0000gn/T/wlpdstm-0d741b.sh
clang: note: diagnostic msg:</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>