MmFile : Is this std.mmFile BUG?
Alex Parrill via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 26 10:30:28 PDT 2015
On Wednesday, 26 August 2015 at 15:49:23 UTC, Junichi Nakata
wrote:
> Hi, all.
> I have a question.
> When 'testdic' file does' t exist, something wrong.
>
> ---
> import std.mmFile;
>
> int main() {
> auto x = new MmFile("testdic",MmFile.Mode.readWrite,0,null);
> return 0;
> }
>
> ---
> OSX 10.10.3 ,
> DMD64 D Compiler v2.069-devel-d0327d9
>
> After testdic file (size=0) was made, Segmentation Fault: 11 .
>
> I don't know whether this code is typical use.
> Is this Phobos BUG? or BY DESIGN?
Note that mmap-ing a zero-length range is invalid on Linux. Dunno
about OSX; it shouldn't segfault though.
More information about the Digitalmars-d-learn
mailing list