-
Notifications
You must be signed in to change notification settings - Fork 274
address_mapt keys are std::size_t #3035
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
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.
These are offsets within a Java method, which has a hard 64KB maximum. Therefore suggest the actual correct type is uint16_t
, or perhaps uint32_t
if you want to be safe re: casually adding two of them together without overflow, or make sure you can express UINT16_T_MAX + 1 to talk about a limit. It probably shouldn't vary in size from platform to platform like size_t
though
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: 5961234).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85743380
5961234
to
4647122
Compare
Thanks a lot for the info. I have rewritten this patch to uniformly use a typedef-name ( |
Java methods have a hard limit of 64KB. Use uint16_t (wrapped in a typedef method_offsett) to represent these offsets. Avoid mixing unsigneds of different widths.
4647122
to
57cd9c1
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: 4647122).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85755311
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).
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: 57cd9c1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85755782
... as that's the type of keys being used during lookup.