Commit 8df8549
Encodes the length of a pointer to an array as the array type's length
In Go, the length of a pointer to an array is the length constant of
the array type; this holds even for a nil pointer. Previously, the
length was encoded by dereferencing the pointer, which made it
unprovable for pointers that are not known to be non-nil.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent c6691f0 commit 8df8549
2 files changed
Lines changed: 13 additions & 6 deletions
File tree
- src
- main/scala/viper/gobra/translator/encodings/arrays
- test/resources/regressions/issues
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
0 commit comments