[Issue 24773] Stable sort() invokes the destructor on uninitialized elements

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 20 09:08:09 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24773

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@s-ludwig created dlang/phobos pull request #9049 "Bugzilla 24773 - don't
invoke destructors on uninitialized elements in stable sort" mentioning this
issue:

- Bugzilla 24773 - don't invoke destructors on uninitialized elements in stable
sort

  Uses a regular initialized temporary array when sorting elements with an
elaborate assignment to avoid undefined behavior when destructors, postblits or
copy constructors are invoked during the array assignment.

https://github.com/dlang/phobos/pull/9049

--


More information about the Digitalmars-d-bugs mailing list