[Issue 11188] std.math.abs fails for shared BigInt type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 27 12:52:21 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=11188
Simen Kjaeraas <simen.kjaras at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #14 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
True - access to the BigInt would need to be protected somehow, and letting
abs(shared BigInt) simply compile without warning signals to the user that it's
perfectly safe, while tearing could still happen (unsynced ptr/length for the
data field, or wrong sign). The way shared works in D today, it's simply the
wrong choice. Thanks for enlightening me! :)
Closing this issue as wontfix because while important parts of the original
issue are fixed, the current name indicates shared only, and forcing the user
to cast (and thus hopefully think about locking or otherwise limiting access).
--
More information about the Digitalmars-d-bugs
mailing list