-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix some bugs relating to machine integer literals #1172
Conversation
I'm curious, is bug 1 in the PR description the same as this issue: runtimeverification/k#4609 ? |
Yes. |
std::string precision_str = str.substr(idx + 1); | ||
long long precision = std::stoll(precision_str); | ||
long long precision_in_bytes = (precision + 7) / 8; | ||
char *token = (char *)malloc(precision_in_bytes); |
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.
Can you remind me where we handle the deallocation of this?
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 this memory might be leaking currently; it's supposed to be freed by the configuration parser once it's no longer needed, but I don't see that happening currently. This is not a regression though; the same thing is already happening with other terms in the configuration parser.
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.
Got it. Should we add an issue in this repo so we don't lose track of this?
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.
LGTM.
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.
Looks good to me
I discovered 2 bugs relating to machine integer literals that are fixed by this PR: