Bug #988
Threading error in Scope::toString
Status: | Resolved | Start date: | 05/08/2012 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | C++ | |||
Target version: | rsb-0.7 |
Description
The caching of the scope string in Scope::toString is not thread-safe. Parallel calls may result in segmentation faults.
Actually the whole way the caching is done doesn't look straight forward. We have the whole scope string in the constructor, split it into components and in toString we rebuild the complete string again if necessary. I will cache the string immediately at construction as toString is called very likely and caching hence is not expensive.
Associated revisions
Always create the scope cache upfront to prevent threading issues in toString. Also this makes the creation of the cache usually much easier.
fixes #988
History
#1 Updated by J. Wienke almost 12 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset r3582.