← Back to index
|
Original Bugzilla link
Bug 20871 – std.socket.UnixAddress @trusted functions can corrupt memory if inherited from
Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2020-05-28T11:40:51Z
Last change time
2024-12-01T16:36:51Z
Keywords
safe
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: phobos#10419 →
Comments
Comment #0
by pro.mathias.lang — 2020-05-28T11:40:51Z
``` import std.socket; import std.stdio; class Oops : UnixAddress { override void setNameLen (socklen_t) @safe { this._nameLen = 99999; } } void main() @safe { auto un = new Oops(); un.setNameLen(0); writeln(un.path()); } ``` ``` dmd -preview=dip1000 -run foo.d ????????????????????????????????????????????????????????????????????????????????????????????????????????!�@h����!�@h���"�@h����"�@h���#�@h����#�@h���$�@h����$�@h���%�@h����%�@h���&�@h����&�@h���'�@h����'�@h���(�@h����(�@h���)�@h����)�@h���*�@h����*�@h���+�@h����+�@h���,�@h����,�@h���-�@h����-�@h���.�@h����.�@h���/�@h����/�@h���@h��� ```
Comment #1
by robert.schadek — 2024-12-01T16:36:51Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/phobos/issues/10419
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB