<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">The file isn’t very large, at 181949 bytes, and is a machine generated bit of code.</div><div class=""><br class=""></div><div class="">The strange thing is that if I run the compile by hand by cutting/pasting the line into a shell window, it compiles in seconds. I run the same code generation/compile/execution with g++ (5.1) and it never locks up.</div><div class=""><br class=""></div><div class="">Another thing, the code is compiled from a daemon that places the compiler under execution limits. If it runs for more than 30 seconds or uses more than 500MB of RAM, it should have the appropriate limit applied to it. I fork the daemon and before exec() for the compiler do the following:</div><div class=""><br class=""></div><div class=""><font face="PT Mono" class="">      struct rlimit rlim;<br class="">      rlim.rlim_cur = rlim.rlim_max = m_compile_max_seconds;<span class="Apple-tab-span" style="white-space: pre;">        </span>// 30<br class=""><br class="">      if (0 != setrlimit(RLIMIT_CPU, &rlim))<br class="">      {<br class="">        xthrow(Sys_rlimit, errno, "system", "can't bound compilation time");<br class="">      }<br class=""><br class="">      rlim.rlim_cur = rlim.rlim_max = m_compile_max_memory * (1 << 20);<span class="Apple-tab-span" style="white-space: pre;">       </span>// 500 MB<br class=""><br class="">      if (0 != setrlimit(RLIMIT_AS, &rlim))<br class="">      {<br class="">        xthrow(Sys_rlimit, errno, "system", "can't limit compiler memory usage");<br class="">      }<br class=""></font><br class=""></div><div class="">This is the compile that locked up. If anyone believes that looking at the source would make a difference, let me know and I’ll send it along.</div><div class=""><br class=""></div><div class="">  501 59880 46191     4004   0  31 10  2495004   9612 -      SN                  0 ??         0:00.02 /opt/local/libexec/llvm-4.0/bin/clang++ -pipe -c -o /Users/barto/UnixEnvironment/CSI/internal/repo4/internal.0/code/381/1.opt -O3 -Winvalid-pch -march=core2 -fstack-protector-strong -D_BSD_SOURCE -DFOR_SPARQL -D_REENTRANT -D_PTHREADS -DTHREAD -D_GLIBCXX_USE_DEPRECATED=0 -DTURBO_GENCODE=1 -DDO_CASSANDRA=0 -DMEM_LIMIT_LEAK_CHECKING -DFULL_RESERVATIONS -DGCC5 -D_DARWIN_C_SOURCE -DDARWIN -DMAC_OSX=1 -std=gnu++14 -m64 -fPIC -I/Users/barto/UnixEnvironment/CSI/repo4/lib -I/Users/barto/UnixEnvironment/CSI/repo4/lib/cgrsrc /Users/barto/UnixEnvironment/CSI/internal/repo4/internal.0/code/381/1.cpp</div>  501 59881 59880     4004   0  31 10  2554904  33884 -      SN                  0 ??        <b class="">21:37.14</b> /opt/local/libexec/llvm-4.0/bin/clang -cc1 -triple x86_64-apple-macosx10.10.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name 1.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 274.2 -dwarf-column-info -debugger-tuning=lldb -coverage-notes-file /Users/barto/UnixEnvironment/CSI/internal/repo4/internal.0/code/381/1.gcno -resource-dir /opt/local/libexec/llvm-4.0/bin/../lib/clang/4.0.0 -D _BSD_SOURCE -D FOR_SPARQL -D _REENTRANT -D _PTHREADS -D THREAD -D _GLIBCXX_USE_DEPRECATED=0 -D TURBO_GENCODE=1 -D DO_CASSANDRA=0 -D MEM_LIMIT_LEAK_CHECKING -D FULL_RESERVATIONS -D GCC5 -D _DARWIN_C_SOURCE -D DARWIN -D MAC_OSX=1 -I /Users/barto/UnixEnvironment/CSI/repo4/lib -I /Users/barto/UnixEnvironment/CSI/repo4/lib/cgrsrc -stdlib=libc++ -O3 -Winvalid-pch -std=gnu++14 -fdeprecated-macro -fdebug-compilation-dir /Users/barto/UnixEnvironment/CSI/repo4/bin -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fblocks -fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /Users/barto/UnixEnvironment/CSI/internal/repo4/internal.0/code/381/1.opt -x c++ /Users/barto/UnixEnvironment/CSI/internal/repo4/internal.0/code/381/1.cpp<br class=""><br class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>David</div><div class=""><br class=""></div><br class=""><div apple-content-edited="true" class="">David Barto<br class=""><a href="mailto:barto@cambridgesemantics.com" class="">barto@cambridgesemantics.com</a><br class=""><br class="">Sometimes, my best code does nothing. Most of the rest of it has bugs.<br class=""><br class=""><br class=""></div><br class=""></body></html>