Skip to content

SqlUDTStorage.GetStaticNullForUdtType accessing shared dictionary without propery synchronization #25509

@stephentoub

Description

@stephentoub

https://github.com/dotnet/corefx/blob/251d65c237aa26b49bc91bac25012340a93e64de/src/System.Data.Common/src/System/Data/Common/SqlUDTStorage.cs#L40-L63

It looks like it was written assuming Dictionary has the same thread-safety characteristics as Hashtable, but it doesn't. Whereas Hashtable is safe for any number of reads to be used concurrently with at most one writer, for a Dictionary a writer must have exclusive access.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions