@@ -114,3 +114,107 @@ Should not contain unsound flow-insensitive invariant m2_locked || (p == & g &&
114114 string: ' ! multithreaded || (*p == 10 || ((0 <= *p && *p <= 1) && p == & g))'
115115 type: assertion
116116 format: C
117+
118+ Same with vojdani.
119+
120+ $ goblint -- set ana. base . privatization vojdani -- enable witness. yaml. enabled -- set ana. activated[+ ] mutexGhosts -- set witness. yaml. entry-types ' ["flow_insensitive_invariant", "ghost_instrumentation"]' 69 -ghost-ptr-protection. c
121+ [Success][Assert] Assertion " *p != 0" will succeed (69 -ghost-ptr-protection. c: 26 : 3 -26: 27 )
122+ [Info][Deadcode] Logical lines of code (LLoC) summary:
123+ live: 15
124+ dead: 0
125+ total lines : 15
126+ [Warning][Race] Memory location p (race with conf. 110 ): (69 -ghost-ptr-protection. c: 7 : 5 -7: 12 )
127+ write with [lock: {m2}, thread: [main, t_fun@69-ghost-ptr-protection. c: 22 : 3 -22: 40 ]] (conf. 110 ) (exp : & p) (69 -ghost-ptr-protection. c: 14 : 3 -14: 9 )
128+ write with [lock: {m2}, thread: [main, t_fun@69-ghost-ptr-protection. c: 22 : 3 -22: 40 ]] (conf. 110 ) (exp : & p) (69 -ghost-ptr-protection. c: 15 : 3 -15: 9 )
129+ read with [mhp: {created= {[main, t_fun@69-ghost-ptr-protection. c: 22 : 3 -22: 40 ]}}, lock: {m1}, thread: [main]] (conf. 110 ) (exp : & p) (69 -ghost-ptr-protection. c: 26 : 3 -26: 27 )
130+ [Info][Witness] witness generation summary:
131+ location invariants: 0
132+ loop invariants: 0
133+ flow-insensitive invariants: 1
134+ total generation entries: 2
135+ [Info][Race] Memory locations race summary:
136+ safe: 2
137+ vulnerable: 0
138+ unsafe: 1
139+ total memory locations: 3
140+
141+ Should not contain unsound flow-insensitive invariant m2_locked || (p == & g && * p == 0 ):
142+
143+ $ yamlWitnessStrip < witness. yml
144+ - entry_type: ghost_instrumentation
145+ content:
146+ ghost_variables:
147+ - name : m1_locked
148+ scope: global
149+ type: int
150+ initial:
151+ value : " 0"
152+ format: c_expression
153+ - name : m2_locked
154+ scope: global
155+ type: int
156+ initial:
157+ value : " 0"
158+ format: c_expression
159+ - name : multithreaded
160+ scope: global
161+ type: int
162+ initial:
163+ value : " 0"
164+ format: c_expression
165+ ghost_updates:
166+ - location:
167+ file_name: 69 -ghost-ptr-protection. c
168+ file_hash: $ FILE_HASH
169+ line: 13
170+ column: 3
171+ function: t_fun
172+ updates:
173+ - variable: m2_locked
174+ value : " 1"
175+ format: c_expression
176+ - location:
177+ file_name: 69 -ghost-ptr-protection. c
178+ file_hash: $ FILE_HASH
179+ line: 16
180+ column: 3
181+ function: t_fun
182+ updates:
183+ - variable: m2_locked
184+ value : " 0"
185+ format: c_expression
186+ - location:
187+ file_name: 69 -ghost-ptr-protection. c
188+ file_hash: $ FILE_HASH
189+ line: 22
190+ column: 3
191+ function: main
192+ updates:
193+ - variable: multithreaded
194+ value : " 1"
195+ format: c_expression
196+ - location:
197+ file_name: 69 -ghost-ptr-protection. c
198+ file_hash: $ FILE_HASH
199+ line: 23
200+ column: 3
201+ function: main
202+ updates:
203+ - variable: m1_locked
204+ value : " 1"
205+ format: c_expression
206+ - location:
207+ file_name: 69 -ghost-ptr-protection. c
208+ file_hash: $ FILE_HASH
209+ line: 28
210+ column: 3
211+ function: main
212+ updates:
213+ - variable: m1_locked
214+ value : " 0"
215+ format: c_expression
216+ - entry_type: flow_insensitive_invariant
217+ flow_insensitive_invariant:
218+ string: ' ! multithreaded || (m1_locked || g == 0)'
219+ type: assertion
220+ format: C
0 commit comments