Skip to content
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

Don't deallocate nullptr in _Hash_vec::_Tidy #2790

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

CaseyCarter
Copy link
Contributor

... since we probably didn't get nullptr from an allocator, and user-defined allocators aren't required to tolerate dellocating nullptr.

Fixes #2789.

@CaseyCarter CaseyCarter added the bug Something isn't working label Jun 13, 2022
@CaseyCarter CaseyCarter requested a review from a team as a code owner June 13, 2022 23:44
... since we probably didn't get `nullptr` from an allocator, and user-defined allocators aren't required to tolerate dellocating `nullptr`.

Fixes microsoft#2789.
@StephanTLavavej
Copy link
Member

Looks good, I pushed trivial changes to the test.

@StephanTLavavej StephanTLavavej self-assigned this Jun 15, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 5419d49 into microsoft:main Jun 16, 2022
@StephanTLavavej
Copy link
Member

Thanks for tidying up this bug! 🐞 🧹 😹

@CaseyCarter CaseyCarter deleted the _Tidy branch July 22, 2022 22:20
fsb4000 pushed a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<xhash>: _Hash_vec::~_Tidy can deallocate(nullptr)
3 participants