www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6983] New: Vararg corrupts string on 64bit

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

           Summary: Vararg corrupts string on 64bit
           Product: D
           Version: unspecified
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: cbkbbejeap mailinator.com
            Blocks: 6047,6576



08:45:25 PST ---
Works on 32-bit, fails on 64-bit linux:

import core.vararg;

void foo(...)
{
    string str = *(cast(string*)_argptr);
    assert(str.length == 0);
}

void main()
{
    foo("");
}

This might be the same as issue 6758, but I'm not certain.

This may be the root cause of issue 6047 and issue 6576.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 21 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6983


Walter Bright <bugzilla digitalmars.com> changed:

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



02:11:11 PDT ---
The 64 bit ABI won't allow using _argptr directly. Instead, use the functions
in core.stdc.stdarg.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 28 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6983


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au




 The 64 bit ABI won't allow using _argptr directly. Instead, use the functions
 in core.stdc.stdarg.
The real bug is bug 7893: the spec says you *can* use _argptr in this way. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 29 2012