D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7118 - Calling a vararg function with float within scope(exit) causes segfault
Summary: Calling a vararg function with float within scope(exit) causes segfault
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86_64 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2011-12-16 11:15 UTC by Mathias Baumann
Modified: 2012-01-28 19:41 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 Mathias Baumann 2011-12-16 11:15:00 UTC
See test case:

module main2;

import tango.core.Vararg;

void vararg ( ... )
{

}

void main(char[][] args)
{
    vararg(12.23); // no crash
    echo();
}

void echo()
{
    scope(exit) vararg(12.23); // segf in line 5
}
Comment 1 Walter Bright 2012-01-28 19:41:00 UTC
I ported it to Phobos:
--------------------------
import std.c.stdarg;

void vararg ( ... )
{
}

void main(char[][] args)
{
    vararg(12.23); // no crash
}

void echo()
{
    scope(exit) vararg(12.23); // segf in line 5
}
------------------------
and it does not crash on Linux in 32 or 64 bit mode. Not for D1 nor D2. Maybe it's a Tango specific problem.