JetBrains / lincheck

Framework for testing concurrent data structures
Mozilla Public License 2.0
538 stars 31 forks source link

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

Closed avpotapov00 closed 1 month ago

avpotapov00 commented 2 months ago

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.

ndkoval commented 2 months ago

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()