Thread overview
[Issue 8360] New: Destruction of uninitialized temporary struct with assert
Jul 08, 2012
Benjamin Thaut
Oct 03, 2013
Kenji Hara
Oct 05, 2013
Walter Bright
July 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8360

           Summary: Destruction of uninitialized temporary struct with
                    assert
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: code@benjamin-thaut.de


--- Comment #0 from Benjamin Thaut <code@benjamin-thaut.de> 2012-07-08 06:39:10 PDT ---
Created an attachment (id=1123)
repro case

When a temporary struct is used as the second argument to assert, and the assert is false, the temporary struct gets destructed despite the fact that it was never actually constructed. See attached repro case.

Tested with dmd 2.058 and dmd.2059

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


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from bearophile_hugs@eml.cc 2012-07-08 07:03:05 PDT ---
See also probably related Issue 8361

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 03, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8360


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> 2013-10-02 20:46:00 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2620

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 05, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8360



--- Comment #3 from github-bugzilla@puremagic.com 2013-10-05 00:16:51 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f2d4350dc3d00a454a9e1619484404da75bec7be fix Issue 8360 - Destruction of uninitialized temporary struct with assert

https://github.com/D-Programming-Language/dmd/commit/10b704a7d6fe04b597b0c99e537be4960cba270f Merge pull request #2620 from 9rnsr/fix8360

Issue 8360 & 8361 - Destruction of uninitialized temporary struct with assert

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 05, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8360


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: -------