Thread overview
[Issue 20376] @disable this(ref return scope Foo rhs) enables broken binaries (out-of-bounds access)
Nov 10, 2019
Basile-z
Nov 10, 2019
ag0aep6g
Nov 11, 2019
Dlang Bot
Nov 12, 2019
Dlang Bot
Mar 21, 2020
Basile-z
November 10, 2019
https://issues.dlang.org/show_bug.cgi?id=20376

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
reduced w/o phobos. should not compile

---
struct Foo
{
    this(ref scope Foo);
}

ubyte fun()
{
    return Foo();
}

void main(){}
---

should fail with

---
Error: cannot implicitly convert expression `Foo()` of type `Foo` to `ubyte`
---

--
November 10, 2019
https://issues.dlang.org/show_bug.cgi?id=20376

ag0aep6g <ag0aep6g@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |ag0aep6g@gmail.com

--
November 11, 2019
https://issues.dlang.org/show_bug.cgi?id=20376

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@RazvanN7 created dlang/dmd pull request #10558 "Issue 20376 - @disable
this(ref return scope Foo rhs) enables broken binaries (out-of-bounds access)"
mentioning this issue:

- Issue 20376 - @disable this(ref return scope Foo rhs) enables broken binaries
(out-of-bounds access)

https://github.com/dlang/dmd/pull/10558

--
November 12, 2019
https://issues.dlang.org/show_bug.cgi?id=20376

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10558 "Issue 20376 - @disable this(ref return scope Foo
rhs) enables broken binaries (out-of-bounds access)" was merged into stable:

- ab5518692cbe8b1d2ab2618c093ca3a569a63ace by RazvanN7:
  Fix Issue 20376 - @disable this(ref return scope Foo rhs) enables broken
binaries (out-of-bounds access)

https://github.com/dlang/dmd/pull/10558

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=20376

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--