View mode: basic / threaded / horizontal-split · Log in · Help
March 19, 2012
[Issue 7735] New: Functions with variadic void[][]... arguments corrupts passed data
http://d.puremagic.com/issues/show_bug.cgi?id=7735

          Summary: Functions with variadic void[][]... arguments corrupts
                   passed data
          Product: D
          Version: D2
         Platform: x86
       OS/Version: Windows
           Status: NEW
         Severity: major
         Priority: P2
        Component: DMD
       AssignedTo: nobody@puremagic.com
       ReportedBy: pszturmaj@tlen.pl


--- Comment #0 from Piotr Szturmaj <pszturmaj@tlen.pl> 2012-03-19 14:53:41 PDT ---
This program:

import std.stdio;

void a(void[][] data...)
{
   writeln(data);
   b(data);
}

void b(void[][] data...)
{
   writeln(data);
   c(data);
}

void c(void[][] data...)
{
   writeln(data);
}

void main()
{
   a([]);
   a([]);
}

Prints:

[[]]
[[0, 0, 0, 0, 0, 0, 0, 0]]
[[8, 0, 0, 0, 88, 254, 19, 0]]
[[]]
[[0, 0, 0, 0, 0, 0, 0, 0]]
[[8, 0, 0, 0, 104, 254, 19, 0]]

Please note the difference between two a() calls. Also, data written from
within c() looks like array layout - 8 byte length and a pointer.

Tested with 2.059head and 32-bit Windows XP.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 22, 2012
[Issue 7735] Functions with variadic void[][]... arguments corrupt passed data
http://d.puremagic.com/issues/show_bug.cgi?id=7735


Piotr Szturmaj <pszturmaj@tlen.pl> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
          Severity|major                       |regression


--- Comment #1 from Piotr Szturmaj <pszturmaj@tlen.pl> 2012-03-22 07:03:59 PDT ---
I checked that last working version was 2.055.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 31, 2012
[Issue 7735] Functions with variadic void[][]... arguments corrupt passed data
http://d.puremagic.com/issues/show_bug.cgi?id=7735


Kenji Hara <k.hara.pg@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
          Keywords|                            |pull, wrong-code


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-03-31 05:17:29 PDT ---
https://github.com/D-Programming-Language/dmd/pull/854

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 31, 2012
[Issue 7735] Functions with variadic void[][]... arguments corrupt passed data
http://d.puremagic.com/issues/show_bug.cgi?id=7735



--- Comment #3 from github-bugzilla@puremagic.com 2012-03-31 13:14:49 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/87bd259af8e3502c81f4361d28ee7b62bed56a44
fix Issue 7735 - Functions with variadic void[][]... arguments corrupt passed
data

https://github.com/D-Programming-Language/dmd/commit/b41a2c360f09b83e4de6951f1e7538372319704f
Merge pull request #854 from 9rnsr/fix7735

fix Issue 7735 - Functions with variadic void[][]... arguments corrupt passed
data

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 31, 2012
[Issue 7735] Functions with variadic void[][]... arguments corrupt passed data
http://d.puremagic.com/issues/show_bug.cgi?id=7735


Walter Bright <bugzilla@digitalmars.com> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home