[Issue 16856] D does not work on FreeBSD current (what will eventually be 12) due to libunwind

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16856

Jacob Carlborg  changed:

   What|Removed |Added

 CC||d...@me.com

--- Comment #3 from Jacob Carlborg  ---
I would expect libunwind to be used on macOS, where exceptions work fine. But
I'm not sure if that's the case.

--


[Issue 16856] D does not work on FreeBSD current (what will eventually be 12) due to libunwind

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16856

--- Comment #2 from Jonathan M Davis  ---
If I compile and run this program

void main()
{
throw new Exception("blah");
}

I get a bus error, and if I run it in gdb, I get this stacktrace:

#0  0x000800cd91bf in _Unwind_RaiseException () from /lib/libgcc_s.so.1
#1  0x0042a994 in _d_throwdwarf ()
#2  0x0042a216 in _Dmain ()
#3  0x0042a827 in
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv ()
#4  0x0042a76d in
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv ()
#5  0x0042a7e3 in _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv ()
#6  0x0042a76d in
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv ()
#7  0x0042a6e7 in _d_run_main ()
#8  0x0042a2aa in main ()

So, I guess that whatever is going wrong relates to _Unwind_RaisException,
which I suppose makes sense, since that would appear to relate to libunwind.

--


[Issue 11367] Include paths on windows do not recursively expand env vars

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11367

Martin Krejcirik  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Martin Krejcirik  ---
Works for me in shell and sc.ini.

--


[Issue 16856] D does not work on FreeBSD current (what will eventually be 12) due to libunwind

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16856

Jonathan M Davis  changed:

   What|Removed |Added

Summary|D is borked on FreeBSD  |D does not work on FreeBSD
   |current (what will  |current (what will
   |eventually be 12)   |eventually be 12) due to
   ||libunwind

--- Comment #1 from Jonathan M Davis  ---
Okay. I've confirmed that this is a problem with FreeBSD current in general and
not just TrueOS, and I've narrowed down commit in the FreeBSD source tree which
broke us. Specifically, it's this one


commit d20793840b5b74acebe80ec710522f7386b452cf
Author: emaste 
Date:   Wed Jul 27 16:01:44 2016 +

Enable LLVM libunwind by default on amd64 and i386

It is a maintained and updated runtime exception stack unwinder that
should be a drop-in replacement.

It can be disabled by setting WITHOUT_LLVM_LIBUNWIND in src.conf.

PR: 206039 [exp-run]
Sponsored by:   The FreeBSD Foundation

and if I rebuild the OS with WITHOUT_LLVM_LIBUNWIND=1, then everything works
again. So, clearly, the problem is that FreeBSD changed to using libunwind from
whatever they were using before, and whatever we do with dmd and druntime is
not compatible with that. The commit message implies that libunwind _should_ be
compatible with what was there before, but in our case, it clearly isn't. I
don't know if that's a problem with FreeBSD and it truly not being a drop-in
replacement, or if we're doing something wrong that happened to work before but
doesn't with libunwind, or what. Unfortunately, I know almost nothing about
libunwind - just that it has to do with dealing with throwing exceptions, so I
really have no idea what the problem could be or what the correct solution is
(I don't even know if this involves dmd or just druntime). I'd guess though
that we need to do something to become compatible with libunwind.

Since libunwind is not specifically a FreeBSD thing, this may affect something
in Linux land. I don't know. But we clearly don't work with FreeBSD 12-to-be
right now because of this.

--


[Issue 16948] broken links in std.stdio due to inccorrect use of WEB macro

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16948

ag0ae...@gmail.com changed:

   What|Removed |Added

   Assignee|nob...@puremagic.com|ag0ae...@gmail.com

--


[Issue 16948] broken links in std.stdio due to inccorrect use of WEB macro

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16948

ag0ae...@gmail.com changed:

   What|Removed |Added

 CC||ag0ae...@gmail.com
Summary|https doesn't replace http  |broken links in std.stdio
   |on dlang.org/phobos |due to inccorrect use of
   ||WEB macro

--- Comment #1 from ag0ae...@gmail.com ---
I'm assuming that you just want the broken links to be fixed. Pull request for
that:

https://github.com/dlang/phobos/pull/4931

I'm changing the title of this issue to reflect that it's about the links. If
you're actually asking for an improved WEB macro, please clarify. Maybe file a
separate issue then.

--


[Issue 16794] .deb not working on Ubuntu 16.10 because of default PIE linking

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16794

Martin Nowak  changed:

   What|Removed |Added

Summary|Official .deb packages must |.deb not working on Ubuntu
   |compile libphobos2.a with   |16.10 because of default
   |-fPIC   |PIE linking

--- Comment #10 from Martin Nowak  ---
Let me clarify a few points.

- We're not going to ship PIC for static archives on all platforms. The
performance penalty is too big for that.
  At the moment we only have a single linux build
(https://github.com/dlang/installer/blob/8b3c7efe1e049f73ec5fc526a849904bf80b434d/create_dmd_release/build_all.d#L33),
so custom static PIC libraries for Ubuntu require quite some changes to the
build scripts.

- Static linking partly defeats the purpose of PIE and ASLR. I'm still missing
some reference on how the Ubuntu team deals with static libraries.

Using -fno-pie might be the better choice for now.

--


[Issue 16654] hashOf returns different hashes for the same string value

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16654

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

   What|Removed |Added

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

--


[Issue 16654] hashOf returns different hashes for the same string value

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16654

--- Comment #3 from github-bugzi...@puremagic.com ---
Commit pushed to stable at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/5c187e05ff87404ebf4884cfc548324c2c3ed0fc
Revert object.hashOf changes from "use array interface to hashOf()"

fixes issues 16654 & 16764.

--


[Issue 16764] `hashOf` is misleading, error-prone, and useless

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16764

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

   What|Removed |Added

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

--


[Issue 16764] `hashOf` is misleading, error-prone, and useless

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16764

--- Comment #2 from github-bugzi...@puremagic.com ---
Commit pushed to stable at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/5c187e05ff87404ebf4884cfc548324c2c3ed0fc
Revert object.hashOf changes from "use array interface to hashOf()"

fixes issues 16654 & 16764.

--


[Issue 16854] Inline assembler has VMOVLHPS and VMOVHLPS swapped

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16854

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

https://github.com/dlang/dmd/commit/95c9e17d9dfc28dc5a09b0d152882f196b1de537
fix Issue 16854 - Inline assembler has VMOVLHPS and VMOVHLPS swapped

https://github.com/dlang/dmd/commit/f42867c5f9f601fc5d67e9c0156bfb5a49a9f019
Merge pull request #6291 from WalterBright/fix16854

fix Issue 16854 - Inline assembler has VMOVLHPS and VMOVHLPS swapped

--


[Issue 16949] New: [Reg 2.073] confusing @safe error message for fields with unsafe destructors

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16949

  Issue ID: 16949
   Summary: [Reg 2.073] confusing @safe error message for fields
with unsafe destructors
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: diagnostic
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

cat > bug.d << CODE
struct A
{
~this(){}
}

@safe struct B
{
A a;
}
CODE
dmd -c bug -transition=safe


Error: cannot take address of parameter this in @safe function ~this


This should have been a deprecation instead of an error hidden by
-transition=safe, hence it's a diagnostic regression. Also missing the line
number btw.

The original useful error message was.

bug.d(6): Error: @safe destructor 'bug.B.~this' cannot call @system destructor
'bug.A.~this'


--


[Issue 16948] https doesn't replace http on dlang.org/phobos

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16948

LucienPe  changed:

   What|Removed |Added

   Keywords||ddoc

--


[Issue 16948] New: https doesn't replace http on dlang.org/phobos

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16948

  Issue ID: 16948
   Summary: https doesn't replace http on dlang.org/phobos
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: lucien.perreg...@gmail.com

Hello,

When parsing a $(WEB https://..., bug X), the "https" doesn't override the
"http".

Explanation:
---
this line:
https://github.com/dlang/phobos/blob/master/std/stdio.d#L4375

produce:
http://https://issues.dlang.org/show_bug.cgi?id=15768;>bug 15768

instead of:
https://issues.dlang.org/show_bug.cgi?id=15768;>bug 15768
---

That's all !

--


[Issue 16947] New: The digest function calls the put function incorrectly.

2016-12-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16947

  Issue ID: 16947
   Summary: The digest function calls the put function
incorrectly.
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: lemp...@gmail.com

The digest function calls the put function incorrectly.

This code does not work.
-
struct MyDigest
{
void put(ubyte data) { }
void put(ubyte a, ubyte b) { }
void start() { }
ubyte[] finish() { return null; }
}

unittest
{
writeln(isOutputRange!(MyDigest, ubyte)); //true
writeln(isOutputRange!(MyDigest, const(ubyte)[])); //true
writeln(isDigest!MyDigest); //true
}

unittest
{
auto d = digest!MyDigest("test"); //compile error!
}
-

How to fix:
-
// https://github.com/dlang/phobos/blob/master/std/digest/digest.d#L457
hash.put(cast(const(ubyte[]))datum);
-
.put(hash, cast(const(ubyte[]))datum);
-

--