<p dir="auto">Fresh clone of repo.<br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/1d53babd2f23439975518fda94d9122b15e779c9/hovercard" href="https://github.com/rust-lang/rust/commit/1d53babd2f23439975518fda94d9122b15e779c9"><tt>1d53bab</tt></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% configure --disable-debug --disable-optimize  --enable-clang
% time make -j8
...
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib
rust: task 7fa031d00000 ran out of stack
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd.dylib
cp: x86_64-apple-darwin/stage2/lib/libcore.dylib
cp: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore-*.dylib: No such file or directory
make: *** [x86_64-apple-darwin/stage2/lib/libcore.dylib] Error 1
make: *** Waiting for unfinished jobs....
rust: task 7fa058c0ad10 ran out of stack

real    4m54.362s
user    22m36.394s
sys 1m4.580s"><pre class="notranslate"><code class="notranslate">% configure --disable-debug --disable-optimize  --enable-clang
% time make -j8
...
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib
rust: task 7fa031d00000 ran out of stack
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd.dylib
cp: x86_64-apple-darwin/stage2/lib/libcore.dylib
cp: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore-*.dylib: No such file or directory
make: *** [x86_64-apple-darwin/stage2/lib/libcore.dylib] Error 1
make: *** Waiting for unfinished jobs....
rust: task 7fa058c0ad10 ran out of stack

real    4m54.362s
user    22m36.394s
sys 1m4.580s
</code></pre></div>
<p dir="auto">This may be a duplicate of another issue, for example perhaps <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13615943" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/6049" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/6049/hovercard" href="https://github.com/rust-lang/rust/issues/6049">#6049</a>.  I'm honestly not sure.</p>
<p dir="auto">At this point I have bisected the problem down to:</p>
<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6/hovercard" href="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6"><tt>4a24f10</tt></a> is the first bad commit<br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6/hovercard" href="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6"><tt>4a24f10</tt></a><br>
Author: Huon Wilson <a href="mailto:dbau.pp+github@gmail.com">dbau.pp+github@gmail.com</a><br>
Date:   Wed Apr 24 22:29:19 2013 +1000</p>
<p dir="auto">(But it is possible that Huon's code is just exposing a latent bug in rustc, rather than actually having something fundamentally wrong with it itself.)  I plan to investigate backing out Huon's change to see if that makes the problem go away, just so I can actually bootstrap a compiler and do more investigation.</p>
<p dir="auto">I encountered an assertion failure in rustc 0.6</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let x = Some(3);
    let y = 0;

    match(x) {
        None =&gt; println(&quot;None&quot;),
        _ if y == 0 =&gt; println(&quot;y is zero&quot;),
        Some(n) =&gt; println(fmt!(&quot;Some(%d)&quot;, n)),
    }
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> x = <span class="pl-v">Some</span><span class="pl-kos">(</span><span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> y = <span class="pl-c1">0</span><span class="pl-kos">;</span>

    <span class="pl-k">match</span><span class="pl-kos">(</span>x<span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-v">None</span> =&gt; <span class="pl-en">println</span><span class="pl-kos">(</span><span class="pl-s">"None"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
        _ <span class="pl-k">if</span> y == <span class="pl-c1">0</span> =&gt; <span class="pl-en">println</span><span class="pl-kos">(</span><span class="pl-s">"y is zero"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
        <span class="pl-v">Some</span><span class="pl-kos">(</span>n<span class="pl-kos">)</span> =&gt; <span class="pl-en">println</span><span class="pl-kos">(</span><span class="pl-en">fmt</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Some(%d)"</span>, n<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Above is a simple test code to reproduce the bug<br>
(Yes it is a silly code which can be rephrased into match nested in if)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kimhyunkang$ RUST_LOG=rustc=1,::rt::backtrace rustc test.rs
rust: task failed at 'assertion failed: (m.len() &gt; 0u || chk.is_some())', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/middle/trans/_match.rs:1262
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7f8789819410 root task failed"><pre class="notranslate"><code class="notranslate">kimhyunkang$ RUST_LOG=rustc=1,::rt::backtrace rustc test.rs
rust: task failed at 'assertion failed: (m.len() &gt; 0u || chk.is_some())', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/middle/trans/_match.rs:1262
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7f8789819410 root task failed
</code></pre></div>