[Issue 14868] MmFile destructor seems to corrupt memory

2015-10-04 Thread via Digitalmars-d-bugs
- MmFile destructor seems to corrupt memory --

[Issue 14868] MmFile destructor seems to corrupt memory

2015-09-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|-

[Issue 14868] MmFile destructor seems to corrupt memory

2015-09-18 Thread via Digitalmars-d-bugs
- MmFile destructor seems to corrupt memory --

[Issue 14868] MmFile destructor seems to corrupt memory

2015-09-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 Vladimir Panteleev changed: What|Removed |Added Keywords||pull --- Comment #13 from Vladimir Pant

[Issue 14868] MmFile destructor seems to corrupt memory

2015-09-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #12 from Vladimir Panteleev --- https://github.com/D-Programming-Language/phobos/pull/3529#issuecomment-136609619 --

[Issue 14868] MmFile destructor seems to corrupt memory

2015-09-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 Vladimir Panteleev changed: What|Removed |Added CC||thecybersha...@gmail.com --- Comment #1

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #10 from Dmitry Olshansky --- - straightforward, to throw out enforce, it will work safely, guarantee Seems like the way to go. I'd think of it as hotfix, it's apparent that file descriptor may already be closed by File object itself.

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #9 from Sergei Degtiarev --- (In reply to Dmitry Olshansky from comment #8) > Pull requests are welcome from anybody. Ok, good, I can do this. However I'm barely three days on the forum and don't know which way to go. I see at least three

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #8 from Dmitry Olshansky --- > That's why I suggest to exclude the check. Can somebody fix it? Pull requests are welcome from anybody. >The class is currently unusable. I'm surprised it even works. std.mmfile is a port of some C++ libr

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #7 from Sergei Degtiarev --- (In reply to Dmitry Olshansky from comment #6) > enforce internally throws exception so calling it in finalizer is baaad idea > with current non-reentrant GC. That's why I suggest to exclude the check. Can so

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 Dmitry Olshansky changed: What|Removed |Added CC||dmitry.o...@gmail.com --- Comment #6 from

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #5 from Sergei Degtiarev --- MmFile class destructor makes only two system calls: ~this() { unmap(); errnoEnforce(fd == -1 || fd <= 2 || .close(fd) != -1, "Could not close handle"); } and the second one, .close(fd), fails with EB

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #4 from Maxim Fomin --- (In reply to Sergei Degtiarev from comment #3) > The MmFile destructor is called after main() termination and throws > exception while trying to clean up the memory. Sounds like class dtor invokes gc. Because curr

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #3 from Sergei Degtiarev --- The MmFile destructor is called after main() termination and throws exception while trying to clean up the memory. --

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 Maxim Fomin changed: What|Removed |Added CC||mxfo...@gmail.com --- Comment #2 from Maxim Fo

[Issue 14868] MmFile destructor seems to corrupt memory

2015-08-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14868 --- Comment #1 from Sergei Degtiarev --- The following line of code: new MmFile(File("file.map","w+"), MmFile.Mode.readWriteNew, 1024, null); seems to confuse the GC: core.exception.InvalidMemoryOperationError@(0) Other constructor overloads, like: