forked from cil-project/cil
-
Notifications
You must be signed in to change notification settings - Fork 24
Not merging inlines breaks fundec invariant #84
Copy link
Copy link
Closed
Description
fundec claims the invariant that the physical objects are in one-to-one correspondence with varinfos:
Lines 688 to 694 in c47bbbd
| (** Function definitions. *) | |
| and fundec = | |
| { mutable svar: varinfo; | |
| (** Holds the name and type as a variable, so we can refer to it | |
| * easily from the program. All references to this function either | |
| * in a function call or in a prototype must point to the same | |
| * varinfo. *) |
And Goblint relies on this invariant by identifying functions by the underlying variable (ID).
In goblint/analyzer#603 (comment), I realized that #72 broke this invariant.
This is also easily seen in the code:
Lines 1421 to 1425 in c47bbbd
| | GFun (fdec, l) as g -> | |
| currentLoc := l; | |
| incr currentDeclIdx; | |
| (* We apply the renaming *) | |
| fdec.svar <- processVarinfo fdec.svar l; |
where the underlying variable is replaced unconditionally (of
merge_inlines).Reactions are currently unavailable