UQ-PAC / aslp

Partial evaluator for Arm's Architecture Specification Language (ASL)
Other
6 stars 2 forks source link

Unknown IMP_DEF when called from gtirb-semantics #85

Closed l-kent closed 3 weeks ago

l-kent commented 1 month ago

I get the following error when I attempt to lift a .gtirb file disassembled from a binary containing an LDAXR instruction (with opcode 0xc85ffd68 here).

error during aslp disassembly (opcode 0xc85ffd68, bytes 68FD5FC8):

Fatal error: exception LibASL.Value.EvalError("Unknown value for IMPLEMENTATION_DEFINED "Has Nested Virtualization"") at file "/nix/store/m146ac8nkl5y01wp2rgrd4iryf8grkw9-ocaml4.14.1-asli-unstable-2024-05-08/share/asli/aslfiles/mra_tools/arch/arch.asl" line 2651 char 11 - line 2652 char 0
Raised at LibASL__Eval.Env.getImpdef in file "libASL/eval.ml", line 447, characters 16-93
Called from LibASL__Dis.dis_expr'.(fun) in file "libASL/dis.ml", line 881, characters 41-71
Called from LibASL__Rws.RWSBase.reads in file "libASL/rws.ml", line 69, characters 47-50
Called from LibASL__Dis.let+ in file "libASL/dis.ml", line 456, characters 16-23
[...]
Called from LibASL__Dis.dis_decode_entry in file "libASL/dis.ml", line 1487, characters 27-67
Called from Dune__exe__Main.to_asli.do_dis in file "bin/main.ml", line 182, characters 13-75

This is notably different to the error when attempting to lift this instruction inside ASLp: https://github.com/UQ-PAC/aslp/issues/84

l-kent commented 1 month ago

I think there are likely to be issues with stlxr too

katrinafyi commented 1 month ago

Moved to aslp issue tracker as it's an issue with the interface aslp provides to gtirb-semantics.

Thanks to the different failure modes, I have a good guess as to the cause. Will get to this next week.

katrinafyi commented 3 weeks ago

Do you have a .gtirb file which raises this error?

l-kent commented 3 weeks ago

ldaxr.zip

katrinafyi commented 3 weeks ago

The linked PR will bring this in line with https://github.com/UQ-PAC/aslp/issues/84 which is.. a more difficult problem.