You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with some cranelift codegen and I'm seeing a hang/OOM related to the variable ssa resolver.
Here's a minimal reproducer (for cranelift/frontend/src/frontend.rs):
#[test]fnssa_state_machine_hang(){let sig = Signature::new(CallConv::SystemV);letmut fn_ctx = FunctionBuilderContext::new();letmut func = Function::with_name_signature(ExternalName::testcase("sample"), sig);{letmut builder = FunctionBuilder::new(&mut func,&mut fn_ctx);let a = Variable::new(0);
builder.declare_var(a,I32);let entry = builder.create_block();let block1 = builder.create_block();let use_block = builder.create_block();// fill entry block
builder.switch_to_block(entry);use cranelift_codegen::ir::TrapCode;
builder.ins().trap(TrapCode::User(0));// fill block1 with back edge
builder.switch_to_block(block1);let cond = builder.ins().iconst(I32,0);
builder.ins().brnz(cond, block1,&[]);
builder.ins().jump(use_block,&[]);// use variable in use_block
builder.switch_to_block(use_block);let _ = builder.use_var(a);
builder.ins().return_(&[]);println!("sealing blocks...");
builder.seal_all_blocks();// hangs
builder.finalize();}println!("{}", func.display(None).to_string());}
It hangs in seal_all_blocks -> run_state_machine with a huge/growing self.calls vec.
Versions and Environment
Cranelift version or commit: v0.73.0 and current main
The text was updated successfully, but these errors were encountered:
Mrmaxmeier
added
bug
Incorrect behavior in the current implementation that needs fixing
cranelift
Issues related to the Cranelift code generator
labels
May 12, 2021
I'm experimenting with some cranelift codegen and I'm seeing a hang/OOM related to the variable ssa resolver.
Here's a minimal reproducer (for
cranelift/frontend/src/frontend.rs
):It hangs in
seal_all_blocks -> run_state_machine
with a huge/growingself.calls
vec.Versions and Environment
Cranelift version or commit:
v0.73.0
and current mainThe text was updated successfully, but these errors were encountered: