www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7118] New: Calling a vararg function with float within scope(exit) causes segfault

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7118

           Summary: Calling a vararg function with float within
                    scope(exit) causes segfault
           Product: D
           Version: D1
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: mathias.baumann sociomantic.com



2011-12-16 11:15:00 PST ---
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
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 16 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7118


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |WORKSFORME



19:41:00 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 28 2012