Bug 6341 – Regression(2.054): Segfault with variadic delegate parameter
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-07-17T14:17:00Z
Last change time
2015-06-09T05:11:57Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
robert
Comments
Comment #0 by robert — 2011-07-17T14:17:36Z
When using dmd 2.054 the following fails with a bus error on OS X and a segfault on linux:
----
void print(void delegate(string...) dg)
{
dg();
}
----
This worked as expected in dmd 2.053.
Comment #1 by robert — 2011-07-31T07:18:48Z
Note that this happens regardless of the number of arguments when calling dg().
Comment #2 by robert — 2011-07-31T07:26:40Z
This hack works as a workaround:
----
void print(void delegate(string) _dg)
{
void dg(string a...)
{
_dg(a);
}
dg();
}
----
Comment #3 by clugdbug — 2011-08-24T04:50:35Z
*** This issue has been marked as a duplicate of issue 6351 ***