[Issue 15644] Change object layout ABI to MI style

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

--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/701641c78081fe23d2345fd2edc184e9e7ea2038
fix Issue 15644 - Switch object layout ABI to MI style

https://github.com/D-Programming-Language/dlang.org/commit/990c42dff8af698320db91135db7e990eb8849bd
Merge pull request #1225 from WalterBright/fix15644

fix Issue 15644 - Switch object layout ABI to MI style

--


[Issue 14942] dmd linking error with SHA and SSSE3

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

--- Comment #5 from Yawniek  ---
sorry wrong issue tracker. this is a LDC or arch bug.

--


[Issue 15480] std.algorithm.iteration.map not accepting multiple lambdas

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

thomas.bock...@gmail.com changed:

   What|Removed |Added

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

--


[Issue 15480] std.algorithm.iteration.map not accepting multiple lambdas

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

--- Comment #5 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/b23608b63523dc8603764cfcff86482abd11b841
Fix Phobos issue 15480

https://github.com/D-Programming-Language/phobos/commit/6bb36bf522b7336dd41873bb4f1a2df57b90f7fc
Merge pull request #3969 from tsbockman/issue_15480

Fix Phobos issue 15480

--


[Issue 7516] Postblit not called for structs returned from a ternary operator

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

--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/094b358ba1c5ecd6708ccd82660f44462cd06314
fix Issue 7516 - Postblit not called for structs returned from a ternary
operator

https://github.com/D-Programming-Language/dmd/commit/1ea699106e924387269681d4b54f2802a25e24d3
Merge pull request #4805 from 9rnsr/fix7516

Issue 7516 - Postblit not called for structs returned from a ternary operator

--


[Issue 15645] Tuple.slice() causes memory corruption.

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

Saurabh Das  changed:

   What|Removed |Added

 CC||saurabh@gmail.com

--


[Issue 14942] dmd linking error with SHA and SSSE3

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

Sobirari Muhomori  changed:

   What|Removed |Added

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

--


[Issue 15646] New: Unresolved symbols when using m32mscoff with Windows subsystem

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

  Issue ID: 15646
   Summary: Unresolved symbols when using m32mscoff with Windows
subsystem
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: major
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: erikas.aub...@gmail.com

The example windows application given at http://wiki.dlang.org/D_for_Win32
works fine when compiled with the default OMF runtime, but when compiled with
-m32mscoff it gives the following error

wintest.obj : error LNK2019: unresolved external symbol _MessageBoxA@16
referenc
ed in function _WinMain@16
wintest.exe : fatal error LNK1120: 1 unresolved externals
--- errorlevel 1120

It also seems to explicitly require a WinMain function--giving a similar
unresolved external symbol error--whereas with the OMF runtime, it seems to
function fine with void main() {}

--


[Issue 15645] New: Tuple.slice() causes memory corruption.

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

  Issue ID: 15645
   Summary: Tuple.slice() causes memory corruption.
   Product: D
   Version: D2
  Hardware: x86_64
   URL: http://forum.dlang.org/thread/ctpsgcekdbwmlsayonqs@for
um.dlang.org
OS: Linux
Status: NEW
  Severity: major
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: marco.le...@gmx.de

Good thing we have @trusted to mark suspicious memory operations that are
actually safe. When it covers a bug that @safe would have caught though, it
leaves a bad taste...

First let's look at the implementation:

@property
ref Tuple!(sliceSpecs!(from, to)) slice(size_t from, size_t to)() @trusted
if (from <= to && to <= Types.length)
{
return *cast(typeof(return)*) &(field[from]);
}

To return a slice into the tuple, a pointer to the new first is reinterpreted
as the new tuple type. This mirrors the effect of slicing an array, just that
tuples are actually structs and that causes a serious problem. Consider we
slice off the first element of the following tuple and compare the relative
offsets of the 2nd and 3rd field respectively:

pragma(msg, Tuple!(int, bool, string)._2.offsetof - Tuple!(int, bool,
string)._1.offsetof);
pragma(msg, Tuple!( bool, string)._1.offsetof - Tuple!( bool,
string)._0.offsetof);

This prints:

4LU
8LU

So the relative offset of the string part moved which causes memory corruption
when slice() reinterprets pointers. More visually the layout on amd64 is:

   0   4   8
Tuple!(int, bool, string): int boolstring
   0   4   8
 Tuple!(bool, string): boolstring

The memory adresses of the boolean field match, but the string moves due to its
alignment constraints.

--