[Issue 21250] dirEntries on non-existant directory causes assert error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 16 15:34:32 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21250
Stefan Koch <uplink.coder at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uplink.coder at gmail.com
--- Comment #1 from Stefan Koch <uplink.coder at gmail.com> ---
What happens here is a ctor dtor mismatch.
A temporary of a Refcounted is created inside a function where the file not
found exception is thrown.
The dtor is called on that temporary, which is basically a ref of the
refcounted since the refcounted has ref semantics on the count.
when the execption passes up a level the destructor of the actual refcouted
value is called. which tries to decrement the refcount again.
--
More information about the Digitalmars-d-bugs
mailing list