Skip to content

Conversation

@trumank
Copy link

@trumank trumank commented Dec 3, 2025

Currently it's possible to create a LowLevelILFunction with no backing function, but the finalized function does not have an arch associated with it so it's nearly unusable. For example:

let llil = LowLevelILMutableFunction::new(self.arch.clone(), None); // <- no owning function
let (instr_len, _) = self.arch.instruction_llil(&bytes, addr, &llil).unwrap();
let llil = llil.finalized();

let inst = llil.instruction_from_index(LowLevelInstructionIndex(0)).unwrap();
if let SetReg(operation) = inst.kind() {
    if let Reg(operation) = operation.source_expr().kind() {
        operation.source_reg(); // PANICS as unwrap in LowLevelILFunction::arch
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant