[Issue 19842] New: std.signals Segfault when connecting with a lambda
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 2 17:23:17 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19842
Issue ID: 19842
Summary: std.signals Segfault when connecting with a lambda
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: codemyst at outlook.com
When passing a lambda instead of a delegate to connect, it causes the app to
segfault.
Tested with DMD 2.085.1.
Here's the most basic sample app that will reproduce the issue:
==========
import std.signals;
import std.stdio;
class Test
{
mixin Signal!(int);
void run ()
{
emit (1);
}
}
class Tester
{
void initialize ()
{
Test test = new Test ();
test.connect ((int a) => trigger (a));
}
void trigger (int a)
{
writeln (a);
}
}
void main ()
{
Tester t = new Tester ();
t.initialize ();
}
==========
--
More information about the Digitalmars-d-bugs
mailing list