Bug 7118 – Calling a vararg function with float within scope(exit) causes segfault
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86_64
OS
Linux
Creation time
2011-12-16T11:15:00Z
Last change time
2012-01-28T19:41:00Z
Keywords
wrong-code
Assigned to
nobody
Creator
mathias.baumann
Comments
Comment #0 by mathias.baumann — 2011-12-16T11:15:00Z
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 by bugzilla — 2012-01-28T19:41:00Z
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.