mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
f001c783d5
Although there are no explicit writes to $paths in the test cases, there is one hidden write: when the first search on external commands is done. Since the internal cache of EnvPathList starts empty, EnvPathList.get() notices that it needs to fetch the environment to update itself. However, the update first modifies .cachedValue and then .cachedPaths. If another goroutine uses .get() in the middle, it would think that the cache is actually up to date and uses the outdated .cachedPaths, which is empty. EnvPathList.get() is now correctly guarded by a write lock. The offending test case has been uncommented as well. |
||
---|---|---|
.. | ||
acme.elv | ||
boilerplate.go | ||
boilerplate.py | ||
builtin_func.go | ||
builtin_modules.bash | ||
builtin_modules.go | ||
builtin_special.go | ||
closure.go | ||
compileOp.go | ||
compiler.go | ||
compileValuesOp.go | ||
compileVariablesOp.go | ||
envPathList.go | ||
error.go | ||
eval_test.go | ||
eval.go | ||
externalcmd.go | ||
glob.go | ||
list.go | ||
map.go | ||
must.go | ||
port.go | ||
search.go | ||
string.go | ||
struct.go | ||
util.go | ||
value_test.go | ||
value.go | ||
variable.go |