[Issue 19133] core.exception.rangeerror at std/file.d(3812):
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 12 17:03:52 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19133
crayolist at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |---
--- Comment #2 from crayolist at gmail.com ---
This issue is not resolved.
Let me try to clarify the issue again;
This line;
https://github.com/dlang/phobos/blob/d262d06a14ca3e6fb659859999931f15c8e01b7c/std/file.d#L3864
will not correctly compute 'len' in the case of Solaris because 'dirent' is
defined like this;
https://github.com/dlang/druntime/blob/75eb3c6e307fbd2488452d0e100724e49c31f35d/src/core/sys/posix/dirent.d#L255
Notice that 'dirent.d_name' is a one character buffer. The line;
immutable len = fd.d_name[].representation.countUntil(0);
cannot compute the correct length because the range has 1 element.
--
More information about the Digitalmars-d-bugs
mailing list