Thread overview
[Issue 14131] va_copy is broken on posix X86_64
Feb 06, 2015
yebblies
Feb 07, 2015
yebblies
Nov 08, 2020
Walter Bright
Dec 17, 2022
Iain Buclaw
February 06, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from yebblies <yebblies@gmail.com> ---
Pull to hack around the real issue using alloca:

https://github.com/D-Programming-Language/dmd/pull/4385 https://github.com/D-Programming-Language/druntime/pull/1158

--
February 07, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

--- Comment #2 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/ee94dbddf7700a5e5864d485e66002e31e6fa670 Partial fix for Issue 14131 - va_copy is broken on posix X86_64

https://github.com/D-Programming-Language/druntime/commit/02270ea991f4218764d2c2cc867c56f082672d4c Merge pull request #1158 from yebblies/va_copy

Partial fix for Issue 14131 - va_copy is broken on posix X86_64

--
February 07, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

--- Comment #3 from yebblies <yebblies@gmail.com> ---
The partial fix makes the original test case work, but this one should still fail.

void copyb(ref va_list ap2, va_list ap)
{
    va_copy(ap2, ap);
}

void copya(int a, string format, ...)
{
    va_list ap;
    va_start(ap, format);

    va_list ap2;
    copyb(ap2, ap);

    auto a1 = va_arg!int(ap);
    auto a2 = va_arg!int(ap);
    auto a3 = va_arg!int(ap);

    assert(a1 == 0x11111111);
    assert(a2 == 0x22222222);
    assert(a3 == 0x33333333);

    auto b1 = va_arg!int(ap2);
    auto b2 = va_arg!int(ap2);
    auto b3 = va_arg!int(ap2);

    assert(b1 == 0x11111111);
    assert(b2 == 0x22222222);
    assert(b3 == 0x33333333);

    va_end(ap);
    va_end(ap2);
}

void testCopy()
{
    copya(0, "", 0x11111111, 0x22222222, 0x33333333);
}

--
February 07, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

--- Comment #4 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/143f780fa6d5fd692d25b8f8318c73f5722616b9 Add test case for Issue 14131 - va_copy is broken on posix X86_64

https://github.com/D-Programming-Language/dmd/commit/97f5400129a489b31f4378cf9a1776ba0debc4b3 Merge pull request #4385 from yebblies/va_copy

Add test case for Issue 14131 - va_copy is broken on posix X86_64

--
February 07, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/ee94dbddf7700a5e5864d485e66002e31e6fa670 Partial fix for Issue 14131 - va_copy is broken on posix X86_64

https://github.com/D-Programming-Language/druntime/commit/02270ea991f4218764d2c2cc867c56f082672d4c Merge pull request #1158 from yebblies/va_copy

--
February 07, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/143f780fa6d5fd692d25b8f8318c73f5722616b9 Add test case for Issue 14131 - va_copy is broken on posix X86_64

https://github.com/D-Programming-Language/dmd/commit/97f5400129a489b31f4378cf9a1776ba0debc4b3 Merge pull request #4385 from yebblies/va_copy

--
February 19, 2015
https://issues.dlang.org/show_bug.cgi?id=14131

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to 2.067 at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/ee94dbddf7700a5e5864d485e66002e31e6fa670 Partial fix for Issue 14131 - va_copy is broken on posix X86_64

https://github.com/D-Programming-Language/druntime/commit/02270ea991f4218764d2c2cc867c56f082672d4c Merge pull request #1158 from yebblies/va_copy

--
November 08, 2020
https://issues.dlang.org/show_bug.cgi?id=14131

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #8 from Walter Bright <bugzilla@digitalmars.com> ---
Have all these commits fixed it? Does the problem remain?

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=14131

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--