syscall: fs_nacl.go: Link needs to check if target exists #22383
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
OS-NaCl
GOOS=nacl, Native Client, removed in Go 1.14
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.9
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Go playground using GOOS=nacl
What did you do?
I was actually testing for race conditions (both Link and Rename are missing calls to lock
the filesystem for which I will create a separate issue), but there's actually no need to
run concurrent goroutines here. Simply attempting to Link(a, b) twice will corrupt the
internal filesystem by leaving two files but a link count of three.
See the stat output https://play.golang.org/p/GfxaxuqQIt
What did you expect to see?
Any attempt to link to an existing file should fail with EEXIST
What did you see instead?
Corrupted filesystem (two files, link count = 3).
The text was updated successfully, but these errors were encountered: