kotlinx-lincheck icon indicating copy to clipboard operation
kotlinx-lincheck copied to clipboard

Names of variables that are written/read through AtomicReference are not displayed in trace

Open avpotapov00 opened this issue 1 year ago • 1 comments

As the AtomicReference doesn't receive a string name of a variable to read/write it, Lincheck currently can't provide its name. The goal is to fix it.

avpotapov00 avatar Apr 30 '24 09:04 avpotapov00

To determine the related field, you can analyze the tested object and find all the fields referencing the specified AtomicReference (or AtomicInteger, AtomicLong, etc) instance. In case there is only one such reference, you can safely present the field name.

Thus, instead of

get()

you will print

Node#1.id.get()

ndkoval avatar Apr 30 '24 10:04 ndkoval