[Issue 4179] [AA] Deleting items from an associative array iterated over

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Apr 17 10:10:30 PDT 2015


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

Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at erdani.com

--- Comment #12 from Andrei Alexandrescu <andrei at erdani.com> ---
We've just had this issue at work, looks like undefined behavior. An
associative array with keys deleted during iteration caused crashes without
stack trace and without core dump.

The right thing here is to throw an exception if an AA is removed from during
an iteration.

--


More information about the Digitalmars-d-bugs mailing list