Thread overview | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 22, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 Johan Engelen <jbc.engelen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jbc.engelen@gmail.com --- Comment #1 from Johan Engelen <jbc.engelen@gmail.com> --- Another effect of the missing semantic on _d_monitorenter/exit is that this code compiles while I think it shouldn't (_d_monitorenter/exit will write to klass.__monitor): void foo() { immutable Klass klass = new Klass; synchronized (klass) { // do smth } } -- |
March 22, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #2 from Johan Engelen <jbc.engelen@gmail.com> --- Synchronizing inside a const method is done in a deprecated method in std.concurrency: // @@@DEPRECATED_2016-03@@@ /++ $(RED Deprecated. isClosed can't be used with a const MessageBox. It will be removed in March 2016). +/ deprecated("isClosed can't be used with a const MessageBox") final @property bool isClosed() const { synchronized( m_lock ) { return m_closed; } } -- |
March 22, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #3 from Johan Engelen <jbc.engelen@gmail.com> --- https://github.com/D-Programming-Language/dmd/pull/5564 -- |
March 29, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #4 from github-bugzilla@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4b74c5f687a06d95c4ffe6e8aefe10f88acc098b Remove deprecated `std.concurrency.MessageBox.isClosed() const`. Within Phobos, this is the only occurrence of synchronizing on an immutable object. Removal of this deprecated function allows us to resolve Issue 14251. -- |
June 30, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 ZombineDev <petar.p.kirov@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |safe CC| |petar.p.kirov@gmail.com -- |
July 12, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com --- Comment #5 from Walter Bright <bugzilla@digitalmars.com> --- I'm not convinced this is a bug. The _monitor field is one that is totally managed by the language, and it outside of its rules. -- |
July 12, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 Lodovico Giaretta <lodovico@giaretart.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lodovico@giaretart.net --- Comment #6 from Lodovico Giaretta <lodovico@giaretart.net> --- (In reply to Walter Bright from comment #5) > I'm not convinced this is a bug. The _monitor field is one that is totally managed by the language, and it outside of its rules. That is true. But having "logically inexistent" fields with different attributes from "normal" fields means that these attributes can not be "physically" exploited, but only "logically" enforced. E.g.: if an immutable object has a mutable mutex, than an immutable object cannot reside in read-only memory. So it's a tradeoff, and it must be clearly defined what is D's way here. -- |
July 12, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #7 from ZombineDev <petar.p.kirov@gmail.com> --- The OP issue doesn't mention class monitors. The bug also affects raw sync primitives like core.sync.mutex and in general everything using Object.IMonitor. -- |
July 12, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #8 from Walter Bright <bugzilla@digitalmars.com> --- (In reply to ZombineDev from comment #7) > The OP issue doesn't mention class monitors. The bug also affects raw sync primitives like core.sync.mutex and in general everything using Object.IMonitor. 'Klass' is a class, and so has a class monitor. -- |
August 27, 2016 [Issue 14251] synchronized (mtx) doesn't check attributes (pure, const) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14251 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #9 from Walter Bright <bugzilla@digitalmars.com> --- https://github.com/dlang/dmd/pull/6092 -- |
Copyright © 1999-2021 by the D Language Foundation