[Issue 18441] Add comments to GC page about tradeoffs in design and impl of GC (garbage collector)

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18441

--- Comment #2 from anonymous4  ---
https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e GC
questionnaire, may be interesting to fill.

--


[Issue 18441] Add comments to GC page about tradeoffs in design and impl of GC (garbage collector)

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18441

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #3 from greenify  ---
There is also this nice GC series: https://dlang.org/blog/the-gc-series/

We should probably link to it from the front page.

--


[Issue 17747] extern(C) shared static module constructor should be called in betterC programs

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17747

Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution|--- |FIXED

--- Comment #18 from Walter Bright  ---
resolved by https://github.com/dlang/dmd/pull/7182

--


[Issue 18450] New: ICE without line numbers on templated struct constructor call

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18450

  Issue ID: 18450
   Summary: ICE without line numbers on templated struct
constructor call
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Keywords: ice
  Severity: major
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: simen.kja...@gmail.com

DMD 2.078.2 on Windows.

This code:

struct S2(T) {
T arr;
}

unittest {
const S2!(int) b;
S2!(const(int)) c = b; // Line 7
}

Gives this error:

foo.d(7): Error:
object.Error@(0): Access Violation

0x0065445A
0x006548FE
0x0064DBD3
0x004B0B90
0x0043FC26
0x004C794B
0x01162110
0x011623E0

With a little wiggling of the types:

struct S2(T) {
T arr;
}

unittest {
const S2!(int[]) b;
S2!(const(int[])) c = b;
}

I get an even more interesting:

foo.d(7): Error:
object.Error@(0): Access Violation

0x0065445A
0x006548FE
0x0064DBD3
0x004B0B90
0x0043FC26
0x004C794B
0x773A8B88 in RtlFreeHeap
0x005797E2
0x00594C94
0x773A73F7 in RtlAllocateHeap
0x3F5011A9
0x05F6122D
0x175102F7
0x01CE5388
0x007201EF
0x01220042
0x047700C6
0x0021035A
0x0504
0x001A0129
0x000106B4
0x00400063
0x001C00C6
0x00820021
0x00620063

--


[Issue 17772] Wrong C++ mangled names for templated functions

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17772

--- Comment #1 from Walter Bright  ---
Partial fix: https://github.com/dlang/dmd/pull/7906

--


[Issue 18450] ICE without line numbers on templated struct constructor call

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18450

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Simen Kjaeraas  ---
Fixed in 2.078.3

--


[Issue 18425] std.process environment["VAR"] = "NAME" does not always take effect

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18425

--- Comment #4 from Rainer Schuetze  ---
> Was this a hand-copied typo, or was there a typo in the original?

Ooops. Typo is in the test only. The result with DFLAGS is the same, though.

> I looked at the code, and it's very complex, so I don't know that it's worth 
> trying to fix.

We could do the same as for posix: call the C runtime instead of
SetEnvironmentVariable. Both dmc and VC have _wputenv

--


[Issue 18451] rejects-valid since 2.076.1

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451

Steven Schveighoffer  changed:

   What|Removed |Added

   Keywords||rejects-valid
 CC||schvei...@yahoo.com
   Hardware|x86_64  |All
 OS|Linux   |All

--


[Issue 18451] [REG 2.076.1] In certain circumstances, calling remove on an array of delegates fails

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451

--- Comment #1 from Steven Schveighoffer  ---
A couple more notes:

Putting a pragma(msg, isInputRange!(typeof(dgs))) before the remove line seems
to make it succeed to compile.

Removing the writeln after the remove also makes it succeed.

--


[Issue 5710] cannot use delegates as parameters to non-global template

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5710

Simen Kjaeraas  changed:

   What|Removed |Added

 CC||simend...@gmail.com

--- Comment #43 from Simen Kjaeraas  ---
*** Issue 11098 has been marked as a duplicate of this issue. ***

--


[Issue 11098] template instance x cannot use local y as parameter to non-global template z

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11098

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #3 from Simen Kjaeraas  ---


*** This issue has been marked as a duplicate of issue 5710 ***

--


[Issue 18451] New: rejects-valid since 2.076.1

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451

  Issue ID: 18451
   Summary: rejects-valid since 2.076.1
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: var.spool.mail...@gmail.com

this code fails to compile:

void main(){
import std.algorithm;
void delegate(void*) dg;
void delegate(void*)[] dgs = [dg, dg, dg];
dgs.writeln;
dgs.remove(1).writeln();
}

if you comment out the line with dgs.writeln;
or if the delegate uses a different type it works as expected.

running all dmd version on run.dlang.io
gives me this output:

Up to  2.075.1: Success with output:
-
[void delegate(void*), void delegate(void*), void delegate(void*)]
[void delegate(void*), void delegate(void*)]
-

Since  2.076.1: Failure with output:
-
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/algorithm/mutation.d(1929):
Error: template std.algorithm.mutation.moveAll cannot deduce function from
argument types !()(void delegate(void*)[], void delegate(void*)[]), candidates
are:
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/algorithm/mutation.d(1455):
   std.algorithm.mutation.moveAll(InputRange1, InputRange2)(InputRange1
src, InputRange2 tgt) if (isInputRange!InputRange1 && isInputRange!InputRange2
&& is(typeof(move(src.front, tgt.front
onlineapp.d(7): Error: template instance
std.algorithm.mutation.remove!(cast(SwapStrategy)2, void delegate(void*)[],
int) error instantiating

forum discussion:
https://forum.dlang.org/post/p66nvj$1g0a$1...@digitalmars.com

--


[Issue 18451] [REG 2.076.1] In certain circumstances, calling remove on an array of delegates fails

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451

Steven Schveighoffer  changed:

   What|Removed |Added

Summary|rejects-valid since 2.076.1 |[REG 2.076.1] In certain
   ||circumstances, calling
   ||remove on an array of
   ||delegates fails

--


[Issue 18452] New: std.zip has size limit of 2 GB

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18452

  Issue ID: 18452
   Summary: std.zip has size limit of 2 GB
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: an...@s-e-a-p.de

I just noticed that std.zip will throw an exception if the source files exceeds
2 GB. It seems an issue with std.zip as zlib has a limit of 4 GB.

Windows 10 with x86_64 architecture.

core.exception.RangeError@std\zip.d(808): Range violation

0x7FF7C9B1705C in d_arrayboundsp
0x7FF7C9B301FF in @safe void std.zip.ZipArchive.putUshort(int, ushort)
0x7FF7C9B2E634 in void[] std.zip.ZipArchive.build()

void zipFolder(string archiveFilePath, string folderPath)
{
import std.zip, std.file;

ZipArchive zip = new ZipArchive();
string folderName = folderPath.baseName;

foreach(entry; dirEntries(folderPath, SpanMode.depth))
{
if (!entry.isFile)
continue;

ArchiveMember am = new ArchiveMember();
am.name = entry.name[folderPath.length + 1..$];
am.expandedData(cast(ubyte[]) read(entry.name));
zip.addMember(am);
}

void[] compressed_data = zip.build(); // zip.build() will throw
write(archiveFilePath, compressed_data);
}

Comment from Steven Schveighoffer:
...And you are right. I looked into it a bit, this has nothing to do
(superficially) with zlib, it has to do with std.zip:

https://github.com/dlang/phobos/blob/0107a6ee09072bda9e486a12caa148dc7af7bb08/std/zip.d#L806

Really, i should be size_t in all places, I can't see why it should ever be
int.
--

And Stefan Koch:
...It was partially changed in this PR:
https://github.com/dlang/phobos/pull/2914/files
The the put methods where left at int must have been an oversight.
--

https://forum.dlang.org/post/pkhmlemvrpkroiqhu...@forum.dlang.org

--


[Issue 18434] BigInt gcd asserts when one argument is zero.

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18434

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/fb66d07b769111664d648b5d4eb0a96d8c3e3101
Fix issue 18434: gcd(BigInt(0), BigInt(1)) fails

The special cases of `gcd(0,a)` and `gcd(a,0)` are not handled correctly
when `BigInt`s are involved.

https://github.com/dlang/phobos/commit/ffc96fd90dceb753b5066ca09524caa5fb1f3ffa
Merge pull request #6170 from quickfur/issue18434

Fix issue 18434: gcd(BigInt(0), BigInt(1)) fails
merged-on-behalf-of: Jack Stouffer 

--


[Issue 18434] BigInt gcd asserts when one argument is zero.

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18434

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 10828] datetime toString functions should accept sink

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10828

Jack Stouffer  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||j...@jackstouffer.com
 Resolution|FIXED   |---

--


[Issue 17420] std.format.formatObject doesn't work with @safe toString specialization

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17420

Jack Stouffer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Jack Stouffer  ---
This was fixed with https://github.com/dlang/phobos/pull/5991

--


[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449

Timothee Cour  changed:

   What|Removed |Added

Summary|extern(C++) class layout|dmd allows to compile
   |does not work   |`extern(C++) class` even
   ||though it should be
   ||extern(C++) struct; should
   ||give error

--


[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449

--- Comment #2 from Timothee Cour  ---
reopening and changed title to:

dmd allows to compile `extern(C++) class` even though it should be extern(C++)
struct; should give error

is that fixable or fundamentally hard to detect when key method is defined ?

--


[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449

Timothee Cour  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--


[Issue 18449] extern(C++) class layout does not work

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449

Timothee Cour  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||timothee.co...@gmail.com
 Resolution|--- |INVALID

--- Comment #1 from Timothee Cour  ---
my bad: forgot to add `virtual ~A();`, closing

--