Closed sim642 closed 9 months ago
It indeed appears unused, so we can remove it.
However, I agree with @stilscher that the root cause for the issue in gobview is probably different: There we have no guarantee all modules have been loaded before the main code of gobview is run. Until we can guarantee that, everything depends on the order in which the compiler (the runtime?) decides to load modules.
However, I agree with @stilscher that the root cause for the issue in gobview is probably different: There we have no guarantee all modules have been loaded before the main code of gobview is run. Until we can guarantee that, everything depends on the order in which the compiler (the runtime?) decides to load modules.
That's what https://github.com/goblint/gobview/pull/39 does the same way that native Goblint.
It calls
initCIL
at top level when linked with-linkall
. This is unexpected, because in Goblint we explicitly callinitCIL
, but that's actually no-op and wouldn't account for runtime changes toMachdep
and whatever else mutableinitCIL
reads.This indirectly causes https://github.com/goblint/gobview/issues/38. In non-
dev
dune profile, jsoo now runs global dead code detection which is more aggressive than what the native compiler can on a per-module basis.The goal here is to remove this unnecessary module from CIL and fix Goblint to not read what
initCIL
writes in top-level expressions. I'll open a follow-up Goblint PR for that.