digitalmars.D.learn - MmFile : Is this std.mmFile BUG?
- Junichi Nakata (15/15) Aug 26 2015 Hi, all.
- Alex Parrill (4/19) Aug 26 2015 Note that mmap-ing a zero-length range is invalid on Linux. Dunno
- rsw0x (2/26) Aug 26 2015 https://issues.dlang.org/show_bug.cgi?id=14968
- Junichi Nakata (7/35) Aug 26 2015 From OS X 10.10.3 manage on mmap:
- Vladimir Panteleev (7/8) Sep 01 2015 The segfault is because of:
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?
Aug 26 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.
Aug 26 2015
On Wednesday, 26 August 2015 at 17:30:29 UTC, Alex Parrill wrote:On Wednesday, 26 August 2015 at 15:49:23 UTC, Junichi Nakata wrote:https://issues.dlang.org/show_bug.cgi?id=14968Hi, 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.
Aug 26 2015
On Wednesday, 26 August 2015 at 22:07:01 UTC, rsw0x wrote:On Wednesday, 26 August 2015 at 17:30:29 UTC, Alex Parrill wrote:From OS X 10.10.3 manage on mmap: ERRORS ... [EINVAL] The len argument was negative. append to https://issues.dlang.org/show_bug.cgi?id=14968 thanks.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.
Aug 26 2015
On Wednesday, 26 August 2015 at 17:30:29 UTC, Alex Parrill wrote:it shouldn't segfault though.The segfault is because of: https://issues.dlang.org/show_bug.cgi?id=14993 It "should've" been an InvalidMemoryOperationError, which in turn was caused by: https://issues.dlang.org/show_bug.cgi?id=14994 https://issues.dlang.org/show_bug.cgi?id=14995
Sep 01 2015