D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6341 - Regression(2.054): Segfault with variadic delegate parameter
Summary: Regression(2.054): Segfault with variadic delegate parameter
Status: RESOLVED DUPLICATE of issue 6351
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 regression
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2011-07-17 14:17 UTC by Robert Clipsham
Modified: 2015-06-09 05:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Robert Clipsham 2011-07-17 14:17:36 UTC
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 Robert Clipsham 2011-07-31 07:18:48 UTC
Note that this happens regardless of the number of arguments when calling dg().
Comment 2 Robert Clipsham 2011-07-31 07:26:40 UTC
This hack works as a workaround:
----
void print(void delegate(string) _dg)
{
    void dg(string a...)
    {
        _dg(a);
    }
    dg();
}
----
Comment 3 Don 2011-08-24 04:50:35 UTC

*** This issue has been marked as a duplicate of issue 6351 ***