Skip to content

Commit acdd71b

Browse files
author
Elliott Slaughter
committed
---
yaml --- r: 32183 b: refs/heads/dist-snap c: 38fee95 h: refs/heads/master i: 32181: c137c06 32179: d663666 32175: 924b8d1 v: v3
1 parent dc95b5e commit acdd71b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 5593add3a8da4bb69ecbece5eaef91f01ca748f7
10+
refs/heads/dist-snap: 38fee9526a313104e3f869bf07c24b0c1d203d11
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/rustc/middle/trans/base.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,12 @@ fn lazily_emit_tydesc_glue(ccx: @crate_ctxt, field: uint,
12331233
fn call_tydesc_glue_full(++bcx: block, v: ValueRef, tydesc: ValueRef,
12341234
field: uint, static_ti: Option<@tydesc_info>) {
12351235
let _icx = bcx.insn_ctxt("call_tydesc_glue_full");
1236-
if bcx.unreachable { return; }
12371236
let ccx = bcx.ccx();
1237+
// NB: Don't short-circuit even if this block is unreachable because
1238+
// GC-based cleanup needs to the see that the roots are live.
1239+
let no_lpads =
1240+
ccx.sess.opts.debugging_opts & session::no_landing_pads != 0;
1241+
if bcx.unreachable && !no_lpads { return; }
12381242

12391243
let static_glue_fn = match static_ti {
12401244
None => None,
@@ -4510,7 +4514,11 @@ fn trans_block_cleanups_(bcx: block,
45104514
/* cleanup_cx: block, */ is_lpad: bool) ->
45114515
block {
45124516
let _icx = bcx.insn_ctxt("trans_block_cleanups");
4513-
if bcx.unreachable { return bcx; }
4517+
// NB: Don't short-circuit even if this block is unreachable because
4518+
// GC-based cleanup needs to the see that the roots are live.
4519+
let no_lpads =
4520+
bcx.ccx().sess.opts.debugging_opts & session::no_landing_pads != 0;
4521+
if bcx.unreachable && !no_lpads { return bcx; }
45144522
let mut bcx = bcx;
45154523
do vec::riter(cleanups) |cu| {
45164524
match cu {

0 commit comments

Comments
 (0)