mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-19 15:14:40 +09:00
Backport #40409 by @lazerg `GetFuncInfo` wrote the friendly name into `funcInfoNameMap` once without holding `funcInfoMapMu`, right before the same locked write. Concurrent requests hitting that branch could then crash the process with `fatal error: concurrent map writes`. This drops the unlocked write. Fixes: https://github.com/go-gitea/gitea/issues/40407 Assisted-by: Claude Code:claude-opus-5-5 Co-authored-by: Lazizbek Ergashev <lazerg2@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
1 file changed
-1
@@ -62,7 +62,6 @@ func GetFuncInfo(fn any, friendlyName ...string) *FuncInfo {
|
||||
info = copyFuncInfo(info)
|
||||
info.shortName = name
|
||||
|
||||
funcInfoNameMap[name] = info
|
||||
funcInfoMapMu.Lock()
|
||||
funcInfoNameMap[name] = info
|
||||
funcInfoMapMu.Unlock()
|
||||
|
||||
Reference in new issue
Block a user