[Issue 17726] Older DMD versions segfault when building Druntime with GCC 7.1

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17726

--- Comment #5 from Vladimir Panteleev  ---
Segfault occurs on the line:

esave = *e;

The line is inside the evalu8 function, which is also the only function needed
to be compiled with -O2 for the bug to manifest.

--


[Issue 17727] addr2line does not understand debug info

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17727

--- Comment #1 from Shachar Shemesh  ---
Also see discussion at
http://forum.dlang.org/thread/om6cfd$akb$1...@digitalmars.com

It seems that the "break main" issue is unrelated to the debug info, and is
because it has another symbol with the name "main".

--


[Issue 17727] New: addr2line does not understand debug info

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17727

  Issue ID: 17727
   Summary: addr2line does not understand debug info
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: major
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: shac...@weka.io

gdb, for some reason, does manage to show line numbers, but only sort of:
$ cat d.d
import std.stdio;

void main() {
writeln("Hello, world");
}

$ dmd -g -gc d.d
$ gdb d
GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1.1) 7.12.50.20170314-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from d...done.
(gdb) break main
Breakpoint 1 at 0x463c4
(gdb) run
Starting program: /tmp/scratch/d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, 0x5559a3c4 in main ()
(gdb) bt
#0  0x5559a3c4 in main ()
#1  0x773f33f1 in __libc_start_main (main=0x5559a3c0 ,
argc=1, argv=0x7fffddb8, init=,
fini=, rtld_fini=, stack_end=0x7fffdda8)
at ../csu/libc-start.c:291
#2  0x55599b5a in _start ()

> Important Point <<
(gdb) step
Single stepping until exit from function main,
which has no line number information.
Hello, world

__libc_start_main (main=0x5559a3c0 , argc=1, argv=0x7fffddb8,
init=, fini=,
rtld_fini=, stack_end=0x7fffdda8) at
../csu/libc-start.c:325
325 ../csu/libc-start.c: No such file or directory.
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb) delete 1

(gdb) break d.d:4
Breakpoint 2 at 0x55599c64: file d.d, line 4.

(gdb) run
Starting program: /tmp/scratch/d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 2, _Dmain () at d.d:4
4   writeln("Hello, world");
(gdb) bt
#0  _Dmain () at d.d:4
(gdb) quit
A debugging session is active.

Inferior 1 [process 15126] will be killed.

Quit anyway? (y or n) y

$ addr2line -e d 0x55599c64
??:0

$ dmd -v
DMD64 D Compiler v2.074.1


To summarize:
gdb can break on function name, but cannot single step from that point, as it
claims it has no line information.

It can break on file:line combination.

addr2line cannot convert that address into a file:line


This issue is a possible duplicate of 8841

--


[Issue 17690] [REG2.066.0] scope guards leak declarations

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17690

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

https://github.com/dlang/dmd/commit/978490aca27e374141607369389f6694d78af182
fix Issue 17690 - scope guards leak declarations

https://github.com/dlang/dmd/commit/5049277bb3f48c19cc7327c0db40c5097ba35f62
Merge pull request #7026 from tgehr/fix17690

fix Issue 17690 - scope guards leak declarations
merged-on-behalf-of: Walter Bright 

--


[Issue 17689] finally clause leaks declarations

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17689

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

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

--


[Issue 17690] [REG2.066.0] scope guards leak declarations

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17690

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
https://github.com/dlang/dmd/pull/7026

--


[Issue 17726] Older DMD versions segfault when building Druntime with GCC 7.1

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17726

--- Comment #4 from Vladimir Panteleev  ---
Narrowed down the file to backend/evalu8.c. (Segfault manifests iff that file
is compiled with -O2).

--


[Issue 17726] Older DMD versions segfault when building Druntime with GCC 7.1

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17726

--- Comment #3 from Vladimir Panteleev  ---
Minimal object.d:

// object_.d //
module object;

class Object {}
struct OffsetTypeInfo {}
class TypeInfo {}
class TypeInfo_Class { void[136] foo = void; }
class TypeInfo_Struct { void[120] foo = void; }
struct ModuleInfo {}

auto fun()
{
return (cast(int*)null)[0 .. 1];
}
///

`dmd -c -m64 object_.d` will segfault if dmd was built with GCC 7.1 and -O2.

--


[Issue 17726] Older DMD versions segfault when building Druntime with GCC 7.1

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17726

--- Comment #2 from Vladimir Panteleev  ---
Works fine without "CFLAGS += -O2", so it looks like either a GCC optimizer
bug, or UB in DMD.

--


[Issue 17726] Older DMD versions segfault when building Druntime with GCC 7.1

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17726

--- Comment #1 from Vladimir Panteleev  ---
(In reply to Vladimir Panteleev from comment #0)
> On Arch Linux, attempting to build D versions from 2015 or earlier

I should clarify that the method used was with Digger (e.g. "digger build
master@2015-01-01"). I've just pushed an update with a workaround for the
PIC/PIE issue.

--


[Issue 17726] New: Older DMD versions segfault when building Druntime with GCC 7.1

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17726

  Issue ID: 17726
   Summary: Older DMD versions segfault when building Druntime
with GCC 7.1
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: dlang-bugzi...@thecybershadow.net

Although the issue doesn't occur with the latest DMD versions, building older
versions is still important for bootstrapping, so I'm opening this issue to
track the problem.

On Arch Linux, attempting to build D versions from 2015 or earlier will result
in a segmentation fault while building Druntime, e.g.:

path/to/dmd -lib -oflib/libdruntime-linux64.a -Xfdruntime.json -m64 -O -release
-inline -w -Isrc -Iimport  src/object_.d src/core/atomic.d ...
make: *** [posix.mak:172: lib/libdruntime-linux64so.a] Segmentation fault (core
dumped)
make: *** Waiting for unfinished jobs
make: *** [posix.mak:178: lib/libdruntime-linux64.a] Segmentation fault (core
dumped)

On Arch Linux, the build succeeds with the packages:
- gcc-libs-multilib
- gcc-multilib
- lib32-gcc-libs
are at version 6.3.1-2, but fails at version 7.1.1-3.

Arch Linux pushed GCC 7.1 to the multilib repo on 2017-05-30.

D versions since https://github.com/dlang/dmd/pull/4924 build OK with any GCC
version. I suspect that the behaviour changed due to the change in default
optimization flags. This is possibly an optimizer regression in GCC 7.x.

--


[Issue 17721] Wrong expression type using vector extensions with certain operands

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17721

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

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

--


[Issue 8006] Implement proper in-place-modification for properties

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8006

Mike  changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com

--


[Issue 17677] [REG 2.073.0] ICE when adding ulong to cfloat

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17677

Walter Bright  changed:

   What|Removed |Added

   Keywords||SIMD
 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
https://github.com/dlang/dmd/pull/7068

--


[Issue 17725] New: [scope] escape from nested function to enclosing local

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17725

  Issue ID: 17725
   Summary: [scope] escape from nested function to enclosing local
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: bugzi...@digitalmars.com

>From Rainer:

  void test() @safe {
int* p;
struct T {
int a;
}
void escape(ref T t) @safe {
p =  // should not compile
}

{
T t;
escape(t);
}
auto bug = *p;
  }

Compile with -dip1000

--


[Issue 17724] digest is not a template declaration, it is a module

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17724

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

   What|Removed |Added

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

--


[Issue 17724] digest is not a template declaration, it is a module

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17724

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

https://github.com/dlang/phobos/commit/a0a0842b901d8346cd6cc60f4deddf16126d361a
Fix issue 17724 - to be deprecated module std.digest.digest conflicts with
contained function digest for alias.

https://github.com/dlang/phobos/commit/bdcbb419e99e50c94a4412b3572ff0ee60c858d1
Merge pull request #5674 from schveiguy/fix17724

Fix issue 17724 remove conflict between module and function `digest`
merged-on-behalf-of: Sebastian Wilzbach 

--


[Issue 17724] digest is not a template declaration, it is a module

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17724

Steven Schveighoffer  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Steven Schveighoffer  ---
PR: https://github.com/dlang/phobos/pull/5674

--


[Issue 17724] digest is not a template declaration, it is a module

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17724

Steven Schveighoffer  changed:

   What|Removed |Added

 CC||schvei...@yahoo.com

--


[Issue 17722] Wrong diagnostic using __traits(compiles, e1 && e2) expressions.

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17722

Iain Buclaw  changed:

   What|Removed |Added

Summary|Wrong diagnostic using  |Wrong diagnostic using
   |vector && vector|__traits(compiles, e1 &&
   |expressions.|e2) expressions.

--


[Issue 17430] [scope] delegate can escape context ptr

2017-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17430

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

https://github.com/dlang/dmd/commit/7f3af47c742e6ec30b69e4ad4064d2474ca31769
fix Issue 17430 - [scope] delegate can escape context ptr

https://github.com/dlang/dmd/commit/d8e010ffb89d8569f10a95a3d2fcb95dad6b29a6
Merge pull request #7027 from WalterBright/fix17430

fix Issue 17430 - [scope] delegate can escape context ptr
merged-on-behalf-of: Rainer Schuetze 

--