Jump to page: 1 2
Thread overview
[Issue 23901] Spurious "Cannot move object [...] with internal pointer"
May 06, 2023
Vladimir Panteleev
May 06, 2023
mhh
May 07, 2023
Vladimir Panteleev
May 07, 2023
mhh
May 07, 2023
mhh
May 07, 2023
Vladimir Panteleev
May 07, 2023
Vladimir Panteleev
May 07, 2023
mhh
May 07, 2023
mhh
May 07, 2023
mhh
May 07, 2023
Vladimir Panteleev
May 06, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
> The error in the test case below emitted by Phobos.
is emitted*

> 1. It disappeared when something in the DMD backend changed;
appeared*

--
May 06, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

mhh <maxhaton@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxhaton@gmail.com

--- Comment #2 from mhh <maxhaton@gmail.com> ---
What is the error supposed to be? I can't reproduce this with dmd on macos for example

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
It's in the issue title. On 2.103.1, the full output is:

core.exception.AssertError@/home/vladimir/data/software/dmd/dmd.2.103.1.linux/dmd2/linux/bin64/../../src/phobos/std/algorithm/mutation.d(1427):
Cannot move object of type Tuple with internal pointer unless `opPostMove` is
defined.
----------------
??:? _d_assert_msg [0x55972b30555c]
??:? pure nothrow @nogc @safe void
std.algorithm.mutation.moveEmplaceImpl!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).moveEmplaceImpl(scope ref
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple, return scope ref
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fddb0]
??:? pure nothrow @nogc @trusted
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple
std.algorithm.mutation.trustedMoveImpl!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).trustedMoveImpl(return scope ref
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fdf7f]
??:? pure nothrow @nogc @safe
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple
std.algorithm.mutation.moveImpl!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).moveImpl(return scope ref
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fdd60]
??:? pure nothrow @nogc @safe
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple
std.algorithm.mutation.move!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).move(return scope ref
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fdd54]
??:? pure nothrow ref @nogc @safe
test.functor10!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).functor10(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).Functor
test.functor10!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).functor10(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).Functor.__ctor(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fdd44]
??:? pure nothrow @nogc @safe
test.functor10!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).functor10(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).Functor
test.functor10!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).functor10(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fdd2d]
??:? pure nothrow @nogc @safe
test.functor10!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).functor10(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).Functor
test.formattingFunctor1!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple).formattingFunctor1(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple) [0x55972b2fdc17]
??:? nothrow @nogc @safe void test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fun!(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc
@safe).fun(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe)
[0x55972b2fdbe0]
??:? nothrow @nogc @safe void test.functor7!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fun,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc
@safe).functor7(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc
@safe).Functor.opCall() [0x55972b2fdba2]
??:? nothrow @nogc @safe void
test.select1!(test.functor4!(test.valueFunctor1!(bool).valueFunctor1(bool).__lambda2,
bool).functor4(bool).Functor, test.functor7!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fun,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc
@safe).functor7(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe).Functor,
test.functor8!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @n...
??:? nothrow @nogc @safe void
test.functor6!(test.select1!(test.functor4!(test.valueFunctor1!(bool).valueFunctor1(bool).__lambda2,
bool).functor4(bool).Functor, test.functor7!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fun,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc
@safe).functor7(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe).Functor,
test.functor8!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delega...
??:? nothrow @nogc @safe void
test.stringifiable1!(test.functor6!(test.select1!(test.functor4!(test.valueFunctor1!(bool).valueFunctor1(bool).__lambda2,
bool).functor4(bool).Functor, test.functor7!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fun,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc
@safe).functor7(test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe).Functor,
test.functor8!(test.fmtIf1!(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).Tuple delegate() nothrow @nogc @safe,
immutable(char)[]).fmtIf1(bool,
test.tuple!(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*).Functor).tuple(test.functor5!(bool).functor5(bool).Functor,
test.functor3(int*)....
??:? _Dmain [0x55972b2fd7cc]

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #4 from mhh <maxhaton@gmail.com> ---
The (full) message isn't in the issue title.

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #5 from mhh <maxhaton@gmail.com> ---


Once again with a .1 release, I cannot reproduce.

// TODO: this assert pulls in half of phobos. we need to work out an
alternative assert strategy.
//    static if (!is(T == class) && hasAliasing!T) if (!__ctfe)
//    {
//        import std.exception : doesPointTo;
//        assert(!doesPointTo(source, source) && !hasElaborateMove!T),
//              "Cannot move object with internal pointer unless `opPostMove`
is defined.");
//    }

>From lifetime.d, are you on an old druntime or something? (This has been
commented out for apparently 4 years).

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|All                         |x86_64
                 OS|All                         |Linux

--- Comment #6 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Please pay attention to the

public import std.algorithm.mutation : move;

line. Yes, it doesn't happen with the core.lifetime implementation. But, again, I don't think the problem is in Phobos or Druntime, it seems to be in the compiler. And yeah, since it's deep in the backend, it might not be reproducible on other platforms.

I haven't reduced it further because it's easy to work around (use the core.lifetime implementation) but there is still probably a bug in the backend.

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #7 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to mhh from comment #5)
> 
> Once again with a .1 release, I cannot reproduce.

If you're still having trouble reproducing it, it does reproduce on run.dlang.io.

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #8 from mhh <maxhaton@gmail.com> ---
It seems to only reproduce with rdmd

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #9 from mhh <maxhaton@gmail.com> ---
^^ ignore that

--
May 07, 2023
https://issues.dlang.org/show_bug.cgi?id=23901

--- Comment #10 from mhh <maxhaton@gmail.com> ---
I actually can reproduce with ldc2 on my M1 macbook

--
« First   ‹ Prev
1 2