Don <> changed:

           What    |Removed                     |Added
                 CC|                            |
            Summary|lazy argument + variadic    |lazy argument + variadic
                   |arguments                   |arguments = segfault

--- Comment #2 from Don <>  2009-07-02 07:58:19 PDT ---
Reduced test case shows it's an out-by-1 error in grabbing the arguments. The
length ends up in the ptr field.
Probably, it's neglecting the fact that lazy arguments have a pointer as well
as the value, or something similar.

import std.stdarg;

void foo(lazy int expr, ...){
    char[] tmp_msg = va_arg!(char[])(_argptr);
    if (cast(int)(tmp_msg.ptr)=="food_for_thought".length)
         assert(0, "length is in the pointer!");

void main(){

Applies to D2 as well as D1.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to