[Issue 15702] std.socket.Socket.receive breaks @safe
https://issues.dlang.org/show_bug.cgi?id=15702 --- Comment #7 from hst...@quickfur.ath.cx --- Alternative fix in the compiler: https://github.com/D-Programming-Language/dmd/pull/5468 --
[Issue 11171] Text relocations in Phobos shared library
https://issues.dlang.org/show_bug.cgi?id=11171 --- Comment #11 from Martin Krejcirik--- Can this be closed ? I think it't fixed since 2.067. --
[Issue 15702] std.socket.Socket.receive breaks @safe
https://issues.dlang.org/show_bug.cgi?id=15702 --- Comment #6 from hst...@quickfur.ath.cx --- Changing std.socket.Socket.receive to use templates to check for array indirections will break too much code, and does not play nice with inheritance. Proposed alternative solution is to make it illegal to implicitly convert T[] to void[] in @safe code if T has indirections. As a compromise, continue to allow explicit cast to void[]. This will plug this particular hole as well as highlight potentially dangerous implicit conversions to void[], but still continue to allow it if the user explicitly casts to void[]. Seems like a reasonable compromise. --
[Issue 15215] Erroneous error messages in to!IntegralType conversions
https://issues.dlang.org/show_bug.cgi?id=15215 Steven Schveighofferchanged: What|Removed |Added CC||schvei...@yahoo.com --- Comment #7 from Steven Schveighoffer --- (In reply to hsteoh from comment #4) > I dunno, the unittest in my PR is a bit hackish. Maybe you should rebase > your PR and checkout the better unittests? Maybe new PR with unit tests? Let the auto-tester do the work ;) --
[Issue 15215] Erroneous error messages in to!IntegralType conversions
https://issues.dlang.org/show_bug.cgi?id=15215 --- Comment #6 from Vladimir Panteleev--- My hands are a bit full these days, sorry... --
[Issue 15215] Erroneous error messages in to!IntegralType conversions
https://issues.dlang.org/show_bug.cgi?id=15215 --- Comment #4 from hst...@quickfur.ath.cx --- I dunno, the unittest in my PR is a bit hackish. Maybe you should rebase your PR and checkout the better unittests? --
[Issue 15215] Erroneous error messages in to!IntegralType conversions
https://issues.dlang.org/show_bug.cgi?id=15215 --- Comment #5 from hst...@quickfur.ath.cx --- I mean *checkin*. --
[Issue 15695] Wrong error message in failed conversion from string to int
https://issues.dlang.org/show_bug.cgi?id=15695 --- Comment #4 from hst...@quickfur.ath.cx --- Apparently this was a duplicate of https://issues.dlang.org/show_bug.cgi?id=15215 --
[Issue 15215] Erroneous error messages in to!IntegralType conversions
https://issues.dlang.org/show_bug.cgi?id=15215 --- Comment #3 from Vladimir Panteleev--- Yes assuming your PR is a superset of this one I guess. --
[Issue 15215] Erroneous error messages in to!IntegralType conversions
https://issues.dlang.org/show_bug.cgi?id=15215 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #2 from hst...@quickfur.ath.cx --- Whoa, just realized that https://issues.dlang.org/show_bug.cgi?id=15695 is a duplicate of this bug, and I submitted a fix for it without realizing that https://github.com/D-Programming-Language/phobos/pull/3728 is essentially the same fix! Anyway... since the fix has been checked in, can this be closed now? --
[Issue 15695] Wrong error message in failed conversion from string to int
https://issues.dlang.org/show_bug.cgi?id=15695 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b57a61f45f90ed4724939a7f1f9e4eab0d3c3857 Merge pull request #4008 from quickfur/conv_errmsg Issue 15695: wrong error message in failed conversion from string to int --
[Issue 15706] std.conv.to!int - wrong line number in exception
https://issues.dlang.org/show_bug.cgi?id=15706 --- Comment #1 from Ivan Kazmenko--- The line number is right when compiling to 64 bits ("-m64"). --
[Issue 15672] Casting from void[] to T[] is erroneously considered @safe
https://issues.dlang.org/show_bug.cgi?id=15672 --- Comment #2 from Chris Wright--- Right. I meant that we add a restriction that you can't cast void[] to mutable(T)[], keeping existing restrictions in place. --
[Issue 15706] New: std.conv.to!int - wrong line number in exception
https://issues.dlang.org/show_bug.cgi?id=15706 Issue ID: 15706 Summary: std.conv.to!int - wrong line number in exception Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: ga...@mail.ru Example program (test.d): - import std.conv; void main () { auto d = to !(int) ("@"); } - Compiling with dmd 2.070.0 on Windows 32-bit with "dmd -g test.d", I get: - std.conv.ConvException@std\conv.d(2002): Unexpected '@' when converting from type string to type int ... 0x00408A80 in main at C:\programs\stuff\dlang\phobos-4008\test.d(7) ... - The actual line number is 3, not 7. If I compile as "dmd -O -g test.d", the reported line number is 8: wrong again, but different. --
[Issue 15672] Casting from void[] to T[] is erroneously considered @safe
https://issues.dlang.org/show_bug.cgi?id=15672 hst...@quickfur.ath.cx changed: What|Removed |Added Hardware|x86_64 |All OS|Windows |All --
[Issue 15672] Casting from void[] to T[] is erroneously considered @safe
https://issues.dlang.org/show_bug.cgi?id=15672 --- Comment #1 from hst...@quickfur.ath.cx --- It's not necessarily safe to cast from void[] to immutable(T)[]. Consider: - int[] a = [ 12345, 54321 ]; void[] b = a; // any array can implicitly convert to void[] immutable(Object)[] c = cast(immutable(Object)[]) b; // suppose this was allowed b[0].toString(); // illegal pointer dereference - In order to ensure @safety, we cannot allow reinterpreting *anything* as a pointer, that wasn't already a pointer of the same type, and with the same attributes. Note that it's not @safe even to convert from a pointer of the same type but different attributes. For instance: - alias safeFunc = void function() @safe; alias unsafeFunc = void function() @system; void main() @safe { unsafeFunc[] unsafePtrs = [ ]; void[] voidPtrs = unsafePtrs; // OK, everything converts to void[] implicitly auto arr = cast(immutable(safeFunc)[]) voidPtrs; // OK to convert func ptrs to func ptrs, right? arr[0](); // oops, we just called a @system function from @safe code } - The void[] step is not necessary, but illustrates the danger of allowing conversions from void[] to immutable(T)[]. --
[Issue 15702] std.socket.Socket.receive breaks @safe
https://issues.dlang.org/show_bug.cgi?id=15702 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #5 from hst...@quickfur.ath.cx --- https://github.com/D-Programming-Language/phobos/pull/4011 --
[Issue 13537] Unions may break immutability
https://issues.dlang.org/show_bug.cgi?id=13537 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #3 from hst...@quickfur.ath.cx --- https://github.com/D-Programming-Language/dmd/pull/5467 --
[Issue 12563] std.container.SList.reverse
https://issues.dlang.org/show_bug.cgi?id=12563 Steven Schveighofferchanged: What|Removed |Added Status|NEW |RESOLVED CC||schvei...@yahoo.com Resolution|--- |FIXED --
[Issue 12563] std.container.SList.reverse
https://issues.dlang.org/show_bug.cgi?id=12563 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/770f7cde90dacb25dabc333888eac5bd96deb356 Issue 12563 - SList: add reverse method https://github.com/D-Programming-Language/phobos/commit/6e7ae5aea66b90759f395f8e4504740c6dd9d09d Merge pull request #3996 from sigod/slist-reverse Issue 12563 - SList: add reverse method --
[Issue 15705] New: Invalid memory operation during array growth (@safe code)
https://issues.dlang.org/show_bug.cgi?id=15705 Issue ID: 15705 Summary: Invalid memory operation during array growth (@safe code) Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/phobos/ OS: Windows Status: NEW Severity: normal Priority: P3 Component: dmd Assignee: nob...@puremagic.com Reporter: matt.elk...@gmail.com See this forum discussion for more context: https://forum.dlang.org/post/jqivvwxqetxqajukc...@forum.dlang.org Consider the following code: [code] import std.stdio; @safe: bool scopeEnded; struct Foo { @disable this(this); this(int val) {writeln("Constructing: ", val, " (", , ")"); value = val;} ~this() {writeln("Destroying: ", value, " (", , ")"); assert(value == int.init || scopeEnded);} int value; } unittest { Foo[] foos; for (auto i = 0; i < 1; ++i) { ++foos.length; foos[$ - 1] = Foo(i); } writeln("Scope about to end"); scopeEnded = true; } [/code] This yields (among other output): core.exception.InvalidMemoryOperationError@src\core\exception.d(679): Invalid memory operation This occurs during the failed assertion. --