mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 15:17:46 +00:00
AK: Return early from swap() when swapping the same object
When swapping the same object, we could end up with a double-free error. This was found while quick-sorting a Vector of Variants holding complex types, reproduced by the new swap_same_complex_object test case.
This commit is contained in:
parent
aa2e19e58f
commit
587d4663a3
3 changed files with 59 additions and 0 deletions
|
@ -51,6 +51,7 @@ set(AK_TEST_SOURCES
|
|||
TestSourceLocation.cpp
|
||||
TestSpan.cpp
|
||||
TestStack.cpp
|
||||
TestStdLibExtras.cpp
|
||||
TestString.cpp
|
||||
TestStringUtils.cpp
|
||||
TestStringView.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue