Issues with debugging GC-related crashes #2

Kagamin spam at here.lot
Thu Apr 19 08:18:28 UTC 2018


On Wednesday, 18 April 2018 at 17:40:56 UTC, Matthias Klumpp 
wrote:
> I get compile errors for the INVARIANT option, and I don't 
> actually know how to deal with those properly:
> ```
> src/gc/impl/conservative/gc.d(1396): Error: shared mutable 
> method core.internal.spinlock.SpinLock.lock is not callable 
> using a shared const object
> src/gc/impl/conservative/gc.d(1396):        Consider adding 
> const or inout to core.internal.spinlock.SpinLock.lock
> src/gc/impl/conservative/gc.d(1403): Error: shared mutable 
> method core.internal.spinlock.SpinLock.unlock is not callable 
> using a shared const object
> src/gc/impl/conservative/gc.d(1403):        Consider adding 
> const or inout to core.internal.spinlock.SpinLock.unlock
> ```
>
> Commenting out the locks (eww!!) yields no change in behavior 
> though.

As a workaround:
(cast(shared)rangesLock).lock();


More information about the Digitalmars-d mailing list