<p dir="auto">I've reduced this down to about bare minimum:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="use std;

native mod foo {
    fn bar(x: int);
}

obj new(i: int) {
    fn f() {
        str::as_buf(&quot;&quot;, {|_x| foo::bar(i) });
    }
}"><pre class="notranslate"><code class="notranslate">use std;

native mod foo {
    fn bar(x: int);
}

obj new(i: int) {
    fn f() {
        str::as_buf("", {|_x| foo::bar(i) });
    }
}
</code></pre></div>
<p dir="auto">Errors out with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rust: upcall fail 'Assertion cx.fcx.llobjfields.contains_key(did.node) failed', ../src/comp/middle/trans.rs:2679
rust: domain main @0x102029600 root task failed"><pre class="notranslate"><code class="notranslate">rust: upcall fail 'Assertion cx.fcx.llobjfields.contains_key(did.node) failed', ../src/comp/middle/trans.rs:2679
rust: domain main @0x102029600 root task failed
</code></pre></div>
<p dir="auto">The following code crashes rustc <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/f05eaa4a650132174a43113e7bf1bce293515428/hovercard" href="https://github.com/rust-lang/rust/commit/f05eaa4a650132174a43113e7bf1bce293515428"><tt>f05eaa4</tt></a> (2011-12-09):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="use std;

import std::option;
import std::ptr;
import std::str;
import std::vec;
#[link_name = &quot;pcre&quot;]
native mod _native {
    type _pcre;
    type _pcre_extra;
    fn pcre_exec(re: *_pcre, extra: *_pcre_extra, subject: str::sbuf,
                 length: int, startoffset: int, options: int,
                 ovector: *int, ovecsize: int);
}

obj pcre(_re: *_native::_pcre) {
    fn match(target: str) -&gt; option::t&lt;[str]&gt; unsafe {
        let oveclen = 30;
        let ovec = vec::init_elt_mut::&lt;int&gt;(0, oveclen as uint);
        let ovecp = vec::unsafe::to_ptr::&lt;int&gt;(ovec);
        let r = str::as_buf(target, { |_target|
            _native::pcre_exec(_re, ptr::null(),
                               _target, str::byte_len(target) as int,
                               0, 0, ovecp, oveclen)
        });
        ret option::none;
    }
}"><pre class="notranslate"><code class="notranslate">use std;

import std::option;
import std::ptr;
import std::str;
import std::vec;
#[link_name = "pcre"]
native mod _native {
    type _pcre;
    type _pcre_extra;
    fn pcre_exec(re: *_pcre, extra: *_pcre_extra, subject: str::sbuf,
                 length: int, startoffset: int, options: int,
                 ovector: *int, ovecsize: int);
}

obj pcre(_re: *_native::_pcre) {
    fn match(target: str) -&gt; option::t&lt;[str]&gt; unsafe {
        let oveclen = 30;
        let ovec = vec::init_elt_mut::&lt;int&gt;(0, oveclen as uint);
        let ovecp = vec::unsafe::to_ptr::&lt;int&gt;(ovec);
        let r = str::as_buf(target, { |_target|
            _native::pcre_exec(_re, ptr::null(),
                               _target, str::byte_len(target) as int,
                               0, 0, ovecp, oveclen)
        });
        ret option::none;
    }
}
</code></pre></div>
<p dir="auto">Stack:<br>
(gdb) bt full<br>
#0  upcall_fail (expr=0x5fd750 "Assertion cx.fcx.llobjfields.contains_key(did.node) failed",</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="file=0x5fd790 &quot;src/comp/middle/trans.rs&quot;, line=2914) at ./src/rt/rust_upcall.cpp:65"><pre class="notranslate"><code class="notranslate">file=0x5fd790 "src/comp/middle/trans.rs", line=2914) at ./src/rt/rust_upcall.cpp:65
</code></pre></div>
<p dir="auto">No locals.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="227519" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/1" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/1/hovercard" href="https://github.com/rust-lang/rust/issues/1">#1</a>  0x0000000000445ef1 in middle::trans::trans_local_var::_adf4c1777aa541de ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228601" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/2" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/2/hovercard" href="https://github.com/rust-lang/rust/issues/2">#2</a>  0x00000000004469ac in middle::trans::trans_var::_d1e14f52b7acf547 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228607" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/3" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/3/hovercard" href="https://github.com/rust-lang/rust/issues/3">#3</a>  0x00000000004461b0 in middle::trans::trans_path::_5717eb102c51bae9 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228626" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/4" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/4/hovercard" href="https://github.com/rust-lang/rust/issues/4">#4</a>  0x0000000000448af2 in middle::trans::trans_lval::_1f6f126aa370757e ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228628" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/5" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/5/hovercard" href="https://github.com/rust-lang/rust/issues/5">#5</a>  0x0000000000450c41 in middle::trans::trans_temp_lval::_1f6f126aa370757e ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228638" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/6" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/6/hovercard" href="https://github.com/rust-lang/rust/issues/6">#6</a>  0x000000000044ca53 in middle::trans::trans_arg_expr::_f2ab945cefa5f446 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228641" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/7" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/7/hovercard" href="https://github.com/rust-lang/rust/issues/7">#7</a>  0x000000000044dde0 in middle::trans::trans_args::_5b185ed913f17816 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228645" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/8" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/8/hovercard" href="https://github.com/rust-lang/rust/issues/8">#8</a>  0x000000000044e1ea in middle::trans::trans_call::_9bc861feeed3fbef ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228646" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/9" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/9/hovercard" href="https://github.com/rust-lang/rust/issues/9">#9</a>  0x0000000000451be9 in middle::trans::trans_expr::_e7480723aeaebdfe ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228647" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/10" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/10/hovercard" href="https://github.com/rust-lang/rust/issues/10">#10</a> 0x000000000045873b in middle::trans::trans_block_dps::_95df69d395a561cc ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228649" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/11" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/11/hovercard" href="https://github.com/rust-lang/rust/issues/11">#11</a> 0x000000000045a884 in middle::trans::trans_closure::_5f30b7b117e0c7c7 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228650" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/12" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/12/hovercard" href="https://github.com/rust-lang/rust/issues/12">#12</a> 0x000000000043e92e in middle::trans::trans_expr_fn::_9276f38be3371c81 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228651" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/13" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/13/hovercard" href="https://github.com/rust-lang/rust/issues/13">#13</a> 0x0000000000451ace in middle::trans::trans_expr::_e7480723aeaebdfe ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228652" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/14" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/14/hovercard" href="https://github.com/rust-lang/rust/issues/14">#14</a> 0x0000000000450b1c in middle::trans::trans_expr_save_in::_58e068603372c187 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228654" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/15" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/15/hovercard" href="https://github.com/rust-lang/rust/issues/15">#15</a> 0x0000000000451093 in middle::trans::trans_temp_lval::_1f6f126aa370757e ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228656" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/16" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/16/hovercard" href="https://github.com/rust-lang/rust/issues/16">#16</a> 0x000000000044ca53 in middle::trans::trans_arg_expr::_f2ab945cefa5f446 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228659" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/17" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/17/hovercard" href="https://github.com/rust-lang/rust/issues/17">#17</a> 0x000000000044dde0 in middle::trans::trans_args::_5b185ed913f17816 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228661" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/18" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/18/hovercard" href="https://github.com/rust-lang/rust/issues/18">#18</a> 0x000000000044e1ea in middle::trans::trans_call::_9bc861feeed3fbef ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228664" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/19" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/19/hovercard" href="https://github.com/rust-lang/rust/issues/19">#19</a> 0x0000000000451be9 in middle::trans::trans_expr::_e7480723aeaebdfe ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228665" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/20" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/20/hovercard" href="https://github.com/rust-lang/rust/issues/20">#20</a> 0x0000000000450eea in middle::trans::trans_temp_lval::_1f6f126aa370757e ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228666" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/21" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/21/hovercard" href="https://github.com/rust-lang/rust/issues/21">#21</a> 0x000000000045624b in middle::trans::init_local::_6fb0f262f37ff83d ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228668" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/22" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/22/hovercard" href="https://github.com/rust-lang/rust/issues/22">#22</a> 0x0000000000456dc2 in middle::trans::trans_stmt::_c6405279a5bafb3f ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228799" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/23" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/23/hovercard" href="https://github.com/rust-lang/rust/issues/23">#23</a> 0x00000000004584df in middle::trans::trans_block_dps::_95df69d395a561cc ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228801" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/24" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/24/hovercard" href="https://github.com/rust-lang/rust/issues/24">#24</a> 0x000000000045a884 in middle::trans::trans_closure::_5f30b7b117e0c7c7 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228804" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/25" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/25/hovercard" href="https://github.com/rust-lang/rust/issues/25">#25</a> 0x000000000045ab8b in middle::trans::trans_fn::_3faad8b8f452ee78 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228805" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/26" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/26/hovercard" href="https://github.com/rust-lang/rust/issues/26">#26</a> 0x00000000004848a1 in middle::trans_objects::process_normal_mthd::_58e8157eea4a94d2 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228806" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/27" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/27/hovercard" href="https://github.com/rust-lang/rust/issues/27">#27</a> 0x0000000000480b2d in middle::trans_objects::create_vtbl::_2bedb929f9a5e9c4 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228808" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/28" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/28/hovercard" href="https://github.com/rust-lang/rust/issues/28">#28</a> 0x000000000047bceb in middle::trans_objects::trans_obj::_fcc8a3a1f08fa3a2 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228809" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/29" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/29/hovercard" href="https://github.com/rust-lang/rust/issues/29">#29</a> 0x000000000045f81f in middle::trans::trans_item::_736b03787cae8654 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228810" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/30" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/30/hovercard" href="https://github.com/rust-lang/rust/issues/30">#30</a> 0x0000000000469778 in middle::trans::trans_crate::_5e8b9ab58c8b592f ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228811" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/31" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/31/hovercard" href="https://github.com/rust-lang/rust/issues/31">#31</a> 0x00000000005f3df0 in driver::rustc::compile_input::thunk9162 ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228812" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/32" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/32/hovercard" href="https://github.com/rust-lang/rust/issues/32">#32</a> 0x00000000005a6998 in driver::rustc::time::_3e691b2a4ba58aee ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228814" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/33" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/33/hovercard" href="https://github.com/rust-lang/rust/issues/33">#33</a> 0x00000000005a94dd in driver::rustc::compile_input::_7475af45dcc3eb6c ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228816" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/34" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/34/hovercard" href="https://github.com/rust-lang/rust/issues/34">#34</a> 0x00000000005b10ef in driver::rustc::main::_cd8b8c8185af3dee ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228817" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/35" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/35/hovercard" href="https://github.com/rust-lang/rust/issues/35">#35</a> 0x00007ffff601e306 in task_start_wrapper (a=0x7ffff511f014) at ./src/rt/rust_task.cpp:176</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    task = 0x8c1cc0
    rval = 42
    failed = false
    env = &lt;optimized out&gt;"><pre class="notranslate"><code class="notranslate">    task = 0x8c1cc0
    rval = 42
    failed = false
    env = &lt;optimized out&gt;
</code></pre></div>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228822" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/36" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/36/hovercard" href="https://github.com/rust-lang/rust/issues/36">#36</a> 0x00000000deadbeef in ?? ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228825" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/37" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/37/hovercard" href="https://github.com/rust-lang/rust/issues/37">#37</a> 0x008c1cc000000000 in ?? ()</p>
<p dir="auto">No symbol table info available.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="228826" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/38" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/38/hovercard" href="https://github.com/rust-lang/rust/issues/38">#38</a> 0x0000000000000000 in ?? ()</p>
<p dir="auto">No symbol table info available.</p>
<p dir="auto">I have not tried reproducing with HEAD yet as HEAD does not build for me right now.</p>