Skip to content

Commit

Permalink
Add errors when architecture machdep not available
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 2, 2024
1 parent ea2f616 commit c341c1c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/util/cilfacade.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ let init_options () =
Cabs2cil.addNestedScopeAttr := get_bool "cil.addNestedScopeAttr";

if get_bool "ana.sv-comp.enabled" then (
Cil.envMachine := match get_string "exp.architecture" with
let machine = match get_string "exp.architecture" with
| "32bit" -> Machdep.gcc32
| "64bit" -> Machdep.gcc64
| _ -> assert false
in
match machine with
| Some _ -> Cil.envMachine := machine
| None ->
GobRef.wrap AnalysisState.should_warn true (fun () -> Messages.msg_final Error ~category:Unsound "Machine definition not available for selected architecture");
Logs.error "Machine definition not available for selected architecture, defaulting to host"
)

let init () =
Expand Down

0 comments on commit c341c1c

Please sign in to comment.