GeezerVison is showing github.com — Map doesn't work without concrete by CaelmBleidd · Pull Request #1228 · UnitTestBot/UTBotJava
Conversation
CaelmBleidd
commented
Oct 25, 2022
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Description
At some moment we discovered that maps do not work as they suppose: sometimes concrete could fix it (for example, when a map was not a parameter), sometimes could not. This request fixes two particular problems: error in type indices for select operation and possible aliasing between nested arrays.
A problem with aliasing could be seen while debugging org.utbot.examples.collections.Maps#putInMapFromParameters. Without this fix it doesn't work for an empty map: touched and values might have the same address, and if we make two put operations, the second one will cause a problem -- memory update for keys will rewrite values as well, and we'll have wrong result values. With one put or with a map that was created during the execution everything worked fine (after the fix with types)
Fixes #436
Type of Change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Automated Testing
org.utbot.examples.collections.Maps#createMapWithEnum
org.utbot.examples.collections.Maps#createMapWithString
org.utbot.examples.collections.Maps#containsKeyAndPuts
org.utbot.examples.collections.Maps#putInMapFromParameters
org.utbot.examples.collections.Maps#mapPutAndGet
Manual Scenario
Didn't check manually.
Checklist:
- The change followed the style guidelines of the UTBot project
- Self-review of the code is passed
- The change contains enough commentaries, particularly in hard-to-understand areas
- New documentation is provided or existed one is altered
- No new warnings
- New tests have been added
- All tests pass locally with my changes
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixes:
* aliasing between nested arrays of UtHashMap and its fields
* unsat for get operation from Map
alisevych
changed the title
Map don't work without concrete
Map doesn't work without concrete
Oct 26, 2022
Reviewers
Damtev
Damtev approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.