You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call New() on the storage objects from multiple goroutines at the same time, go runtime may error with fatal error: concurrent map writes. This happens because the files map inside the storage struct has no concurrency protection around multiple access.
Other concurrency issues probably exist for accessing the children map inside the storage object.
The text was updated successfully, but these errors were encountered:
@sfc-gh-thardie Yep, this is an issue that unfortunately ends up affecting go-git as well. I would support a new implementation keeping the current as-is. Then offer users a way to opt into the safer approach.
From an API perspective, we could do something similar to the approach on the recent osfs changes, in which we introduced sub-types with options. Is this something you would be keen to implement?
If you call
New()
on thestorage
objects from multiple goroutines at the same time, go runtime may error withfatal error: concurrent map writes
. This happens because thefiles
map inside thestorage
struct has no concurrency protection around multiple access.Other concurrency issues probably exist for accessing the
children
map inside thestorage
object.The text was updated successfully, but these errors were encountered: