-
Notifications
You must be signed in to change notification settings - Fork 274
L1 renaming at each declaration #3980
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
Conversation
Actually marking this RFC: the second commit makes perfect sense, it's odd that previously the suffix was not included. Could TG people (@thk123, @allredj, @peterschrammel, or anyone else) let me know whether this breaks anything on your end? |
Would you mind elaborating briefly what kind of thing previously went wrong? I get the vague idea but just want to check my understanding. Some of that explanation might usefully make its way into comments in Also am I right in thinking the |
Yes, I need to add a lot more documentation here/in the commit message. The (observable) problem is that objects declared in loops got the same L1 name, which implies they had the same address. Thus objects were spuriously reported as dead when their address was taken, because a pointer to the latest (live) object would be the same as one to an earlier (genuinely dead) object. A problem not yet fully fixed is regression/cbmc/vla3, which still fails despite the work here. |
e57ec80
to
205baa8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 205baa8).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98894303
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
205baa8
to
ed73813
Compare
I have cleaned up the changes a bit and made the commit messages clearer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: ed73813).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99232393
ed73813
to
953e2d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 953e2d0).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99247250
953e2d0
to
1bab7c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 1bab7c1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99321819
1bab7c1
to
83e58f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 83e58f3).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99759647
83e58f3
to
9f90b20
Compare
auto entry = unique_index_map.emplace(id, minimum_index); | ||
|
||
if(!entry.second) | ||
entry.first->second = std::max(entry.first->second + 1, minimum_index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we could avoid the if
condition if the function is always called with the same minimum index, I don't know if that's always the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, even right now we (intentionally) use 0
for L1 indices when setting up new threads, but elsewhere use 1
. And also that facility is rather general, we could as well use it for non-det counters any maybe others.
450aca6
to
f4c2262
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 9806ccd).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102906311
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: 9f9c8b8).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102972059
Status will be re-evaluated on next push.
Common spurious failures:
-
the cbmc commit has disappeared in the mean time (e.g. in a force-push)
-
the author is not in the list of contributors (e.g. first-time contributors).
-
the compatibility was already broken by an earlier merge.
2777f85
to
a382218
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: 2777f85).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102999251
Status will be re-evaluated on next push.
Common spurious failures:
-
the cbmc commit has disappeared in the mean time (e.g. in a force-push)
-
the author is not in the list of contributors (e.g. first-time contributors).
-
the compatibility was already broken by an earlier merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: a382218).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/103000236
Status will be re-evaluated on next push.
Common spurious failures:
-
the cbmc commit has disappeared in the mean time (e.g. in a force-push)
-
the author is not in the list of contributors (e.g. first-time contributors).
-
the compatibility was already broken by an earlier merge.
3885343
to
3dbd7ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: 3dbd7ba).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/103022135
Status will be re-evaluated on next push.
Common spurious failures:
-
the cbmc commit has disappeared in the mean time (e.g. in a force-push)
-
the author is not in the list of contributors (e.g. first-time contributors).
-
the compatibility was already broken by an earlier merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: d165461).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/103065221
Status will be re-evaluated on next push.
Common spurious failures:
-
the cbmc commit has disappeared in the mean time (e.g. in a force-push)
-
the author is not in the list of contributors (e.g. first-time contributors).
-
the compatibility was already broken by an earlier merge.
Try to make clearer what we can(not) remove from renaming maps. Also do small cleanups of the code.
This was done up until c8f0f7b. The (observable) problem tackled here is that objects declared in loops got the same L1 name, which implies they had the same address. Thus objects were spuriously reported as dead when their address was taken, because a pointer to the latest (live) object would be the same as one to an earlier (genuinely dead) object. A side effect of this change is objects generated for test suites now have L1 indices, as witnessed in the pointer-function-parameters test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: a397a58).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/103457649
I still need to review why the second commit is necessary, thus marking work-in-progress.