Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompareCIL.comparCilFiles: Handle multiple declarations of globals #941

Closed
wants to merge 1 commit into from

Conversation

jerhard
Copy link
Member

@jerhard jerhard commented Dec 2, 2022

Allow the case that there are multiple declarations of a global. Since we are only interested whether declarations exist or not, and the varinfo we still only keep an optional declaration.

Checks that multiple declarations of a global refer to the same varinfo. When CompareCIL.compareCilFiles.addGlobal is used to fold over a Cil.file, it should only encounter declarations of one Cil.file, where the referenced varinfos should be the same memory object.

Closes #940.

Allow the case that there are multiple declarations of a global. Since we are only interested whether declarations exist or not, and the varinfo we still only keep an optional declaration.

Check that multiple declarations of a global refer to the same varinfo.
@jerhard jerhard added the bug label Dec 2, 2022
@jerhard jerhard assigned jerhard and unassigned jerhard Dec 2, 2022
@sim642
Copy link
Member

sim642 commented Dec 5, 2022

Conceptually this makes sense, but I think there's some deeper CIL invariant being broken. Here CIL claims that there should only be one declaration (even if the file contained multiple): https://github.com/goblint/cil/blob/5a3b7bb7f4d9b67678826ab7698f8a9048891553/src/cil.ml#L200-L202.

@sim642
Copy link
Member

sim642 commented Dec 12, 2022

Closing this because the root issue isn't the incremental comparison: #940 (comment). This just suppresses an error that should be solved differently.

@sim642 sim642 closed this Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server mode crashes on re-analysis
2 participants