D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7891 - int[] broken in vararg if it appears after 5 arguments of type bool
Summary: int[] broken in vararg if it appears after 5 arguments of type bool
Status: RESOLVED DUPLICATE of issue 6758
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86_64 Linux
: P2 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 12:09 UTC by Mathias Baumann
Modified: 2012-04-16 03:41 UTC (History)
2 users (show)

See Also:


Attachments
testcase (1.43 KB, application/octet-stream)
2012-04-16 03:21 UTC, Mathias Baumann
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Mathias Baumann 2012-04-11 12:09:32 UTC
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
Comment 1 Don 2012-04-12 08:13:06 UTC
I think this might be the same as bug 6758. In this case the hidden 'this' parameter is messing with the alignment.
Comment 2 Don 2012-04-13 03:26:23 UTC
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 ***
Comment 3 Mathias Baumann 2012-04-16 03:21:14 UTC
Created attachment 1090 [details]
testcase

I thought I added it, but apparently I did not. Here is the testcase.
Comment 4 Leandro Lucarella 2012-04-16 03:41:56 UTC
(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 :)