Bug 21303 – Segfault with -preview=dip1021 and -inline on trivial std.socket code

Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-10-11T07:33:35Z
Last change time
2024-12-13T19:11:58Z
Assigned to
No Owner
Creator
mipri
Moved to GitHub: dmd#19800 →

Comments

Comment #0 by mipri — 2020-10-11T07:33:35Z
The following reduced example of a TCP server segfaults with DMD64 D Compiler v2.094.1-beta.1 when compiled with *both* -inline and -preview=dip1021: import std.socket : TcpSocket; import std.stdio : writefln; void main() { auto listener = new TcpSocket; auto client = listener.accept; writefln("Received connection from %s.", client.remoteAddress.toString); }
Comment #1 by razvan.nitu1305 — 2023-04-05T11:28:49Z
Tested with latest master. It seems that the `-inline` switch does not affect the outcome. This seems to be a dip1021 problem.
Comment #2 by robert.schadek — 2024-12-13T19:11:58Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19800 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB