Thread overview
[Issue 7891] New: int[] broken in vararg if it appears after 5 arguments of type bool
Apr 11, 2012
Mathias Baumann
Apr 12, 2012
Don
Apr 13, 2012
Don
Apr 16, 2012
Mathias Baumann
Apr 16, 2012
Leandro Lucarella
April 11, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7891

           Summary: int[] broken in vararg if it appears after 5 arguments
                    of type bool
           Product: D
           Version: unspecified
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: mathias.baumann@sociomantic.com


--- Comment #0 from Mathias Baumann <mathias.baumann@sociomantic.com> 2012-04-11 12:09:32 PDT ---
Certain combination of parameters make an int[] array fail when called at a vararg function _inside_ a class.

Output of attached program for me is:

Note the length of the second inside block

INSIDE:
Size: 16 Array: len: 3 ptr: 7f8e5c733ce0.
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 16 Array: len: 3 ptr: 7f8e5c733ce0.
Size: 1 Bool: 1

INSIDE:
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 16 Array: len: 140249413139680 ptr: 3.
Size: 1 Bool: 224

OUTSIDE:
Size: 16 Array: len: 3 ptr: 7f8e5c733ce0.
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 1 Bool: 1
Size: 16 Array: len: 3 ptr: 7f8e5c733ce0.
Size: 1 Bool: 1
Class: 7f8e5c733d00 140249413139712

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7891


Don <clugdbug@yahoo.com.au> changed:

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


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2012-04-12 08:13:06 PDT ---
I think this might be the same as bug 6758. In this case the hidden 'this' parameter is messing with the alignment.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 13, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7891


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2012-04-13 03:26:23 PDT ---
This is a duplicate of bug 6758. See comments there. This is a horrific bug.

*** This issue has been marked as a duplicate of issue 6758 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 16, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7891



--- Comment #3 from Mathias Baumann <mathias.baumann@sociomantic.com> 2012-04-16 03:21:14 PDT ---
Created an attachment (id=1090)
testcase

I thought I added it, but apparently I did not. Here is the testcase.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 16, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7891


Leandro Lucarella <leandro.lucarella@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |leandro.lucarella@sociomant
                   |                            |ic.com


--- Comment #4 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2012-04-16 03:41:56 PDT ---
(In reply to comment #3)
> Created an attachment (id=1090) [details]
> testcase
> 
> I thought I added it, but apparently I did not. Here is the testcase.

Maybe you should add it to the other bug then :)

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