Describe the bug
We meet the problem while there are other problems with hashmap, such as buffer overflow or OOM. With these problem, the GetOrInset was actually failed and the index was -1 , which whould finally called core when trying to use this index.
To Reproduce
Reproduce with buffer overflow or OOM while ReSizing or other error happened in GetOrInsert.
Expected behavior
Check the status of GetOrInsert and throw exception if not ok.
Describe the bug We meet the problem while there are other problems with hashmap, such as buffer overflow or OOM. With these problem, the GetOrInset was actually failed and the index was -1 , which whould finally called core when trying to use this index.
To Reproduce Reproduce with buffer overflow or OOM while ReSizing or other error happened in GetOrInsert.
Expected behavior Check the status of GetOrInsert and throw exception if not ok.