[Issue 16057] New: [TDPL] synchronized (a, b) compiles and runs with wrong semantics

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 22 05:46:29 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16057

          Issue ID: 16057
           Summary: [TDPL] synchronized (a, b) compiles and runs with
                    wrong semantics
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: andrei at erdani.com

According to TDPL, multiple-arguments synchronized locks them in increasing
address order so as to prevent deadlock. What the statement actually does is...
use the comma expression for the arguments, so only the last object gets
locked.

--


More information about the Digitalmars-d-bugs mailing list