[BUG] Using delete
operator for the memory allocated with placement new
#42
Labels
bug
Something isn't working
Describe the bug
The code uses
delete
operator for the object created via placement new operator. This is non-conformant and should be probably replaced viastorage->~storage()
followed by::operator delete(mem);
for theptr
itself.It also invokes asan crash:
To Reproduce
Steps to reproduce the behavior:
gcc
asanExpected behavior
No crash.
System (please complete the following information):
The text was updated successfully, but these errors were encountered: