[Issue 15079] [REG2.068.1] Assertion `fd->semanticRun == PASSsemantic3done' failed.

2015-09-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15079

--- 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/848ea9a8698e3dade62374a540953483c7811d6c
fix Issue 15079 - Assertion `fd->semanticRun == PASSsemantic3done' failed.

It was another surface of issue 15044, and fixed from 2.068.2 - the attribute
inference problem had sent a function which is not yet completed semantic
analysis to glue layer, and the breaking of internal invariance has been
detected.

https://github.com/D-Programming-Language/dmd/commit/8cad0112b895aa8eeabd0940f2f3016a4e7399af
Merge pull request #5120 from 9rnsr/fix15079

[REG2.068.1] Issue 15079 - Assertion `fd->semanticRun == PASSsemantic3done'
failed.

--


[Issue 15079] [REG2.068.1] Assertion `fd->semanticRun == PASSsemantic3done' failed.

2015-09-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15079

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

   What|Removed |Added

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

--


[Issue 15079] [REG2.068.1] Assertion `fd->semanticRun == PASSsemantic3done' failed.

2015-09-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15079

Kenji Hara  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Hardware|x86_64  |All
Summary|Assertion `fd->semanticRun  |[REG2.068.1] Assertion
   |== PASSsemantic3done'   |`fd->semanticRun ==
   |failed. |PASSsemantic3done' failed.
 OS|Linux   |All

--- Comment #5 from Kenji Hara  ---
(In reply to Marc Schütz from comment #4)
> Created attachment 1552 [details]
> reduced testcase

Thank you very much, Marc!

I've slightly tweaked the case and get the minimum code to reproduce the error.

scan_code.d:
---
import parsing;

parsing.d:
---
Vector!string parseAlgorithmName()
{
assert(0);
}

struct Vector(ALLOC)
{
@disable this(this);

RefCounted!(Vector, ALLOC) dupr()
{
assert(0);
}
}

struct RefCounted(T, ALLOC)
{
~this()
{
T* objc;
.destroy(*objc);
}
}

// 

void _destructRecurse(S)(ref S s)
if (is(S == struct))
{
static if (__traits(hasMember, S, "__xdtor") &&
   __traits(isSame, S, __traits(parent, s.__xdtor)))
{
s.__xdtor();
}
}

void destroy(T)(ref T obj) if (is(T == struct))
{
_destructRecurse(obj);
() @trusted {
auto buf = (cast(ubyte*) )[0 .. T.sizeof];
auto init = cast(ubyte[])typeid(T).init();
if (init.ptr is null) // null ptr means initialize to 0s
buf[] = 0;
else
buf[] = init[];
} ();
}

command line:
---
dmd -c scan_token.d

parsing.d(8): Error: function parsing.Vector!string.Vector.__aggrPostblit
errors compiling the function


Fortunately, the error is now disappeared with git-head. After the bisecting
git history, I've reached to the commit which the issue has fixed.

  SHA-1: af4d3a4158f95d1720b42e8027ae2aead90c7a4f

  Merge pull request #5075 from 9rnsr/fix15044

  [REG2.068.0] Issue 15044 - destroy might leak memory


As a conclusion, it was another surface of issue 15044, and fixed from 2.068.2
- the attribute inference problem had sent a function which is not yet
completed semantic analysis to glue layer, and the breaking of internal
invariance has been detected.

--


[Issue 15079] [REG2.068.1] Assertion `fd->semanticRun == PASSsemantic3done' failed.

2015-09-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15079

Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from Kenji Hara  ---
Add a case to the dmd test suite.

https://github.com/D-Programming-Language/dmd/pull/5120

--