#2570 closed defect (done)

SymbolicExpressionTree GetLength and GetDepth could return wrong results

Reported by: mkommend Owned by: mkommend
Priority: high Milestone: HeuristicLab 3.3.14
Component: Encodings.SymbolicExpressionTreeEncoding Version: 3.3.13
Keywords: Cc:

Description

SymbolicExpressionTree.GetLength and GetDepth are not implemented thread-safe and could return wrong, intermediate results when two threads access those methods in parallel.

Change History (5)

comment:1 Changed 14 months ago by mkommend

  • Status changed from new to accepted

comment:2 Changed 14 months ago by mkommend

r13579: Made SymbolicExpressionTreeNode.GetDepth/Length thread safe.

comment:3 Changed 14 months ago by mkommend

  • Owner changed from mkommend to gkronber
  • Status changed from accepted to reviewing

comment:4 Changed 14 months ago by gkronber

  • Owner changed from gkronber to mkommend
  • Status changed from reviewing to readytorelease

Reviewed r13579. The assignment of ushort values is thread-safe (length = l, depth = d). So this should be ok.

The only problem I see is duplicate writes to length or depth but that should not be an issue since it should always write the same value.

comment:5 Changed 13 months ago by mkommend

  • Resolution set to done
  • Status changed from readytorelease to closed

r13641: Merged r13579 into stable.

Note: See TracTickets for help on using tickets.