[Issue 2632] Setting length on invalid arrays causes assertion failure with a debug runtime

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 22 22:11:10 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=2632


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |INVALID


--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> 2012-01-22 22:11:06 PST ---
I think both cases are clearly undefined behavior. The first uses a cast to
bypass checks in order to create an array of elements that don't exist, the
second uses a union to achieve the same.

I don't think the spec needs to be changed to reflect that using unions to
manipulate things under the hood, and using forcible casts, mean you're on your
own.

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


More information about the Digitalmars-d-bugs mailing list