Skip to content

runtime/race: confusing/legacy comments referring to *.c files that no longer exist #13550

@odeke-em

Description

@odeke-em

In file runtime/race/race.go there is a legacy comment that was last updated before the C code in the runtime was eliminated. That comment's last update in 2014-09-08 yet announcements for ridding the runtime of C code were made in 2015 https://twitter.com/bradfitz/status/598551393608159233

And in particular the confusing one is:

$ git log | head -n 1 && cat race.go | grep -n race.c
commit 7e1791b97f53bd42808ef2d2e783134b9c3de257
12:// Calls to the runtime are done directly from src/runtime/race.c.
$ cat race.c
cat: race.c: No such file or directory

Altogether there are 2 confusing comments in runtime/race ie

$ grep -R '\w\+\/\w\+\.c' * | cut -d":" -f1 | sort | uniq | grep ".go" | while read F;do git blame $F | grep -n '\w\+\/\w\+\.c';done
12:220a6de4 src/pkg/runtime/race/race.go (Russ Cox        2014-09-08 00:06:45 -0400 12) // Calls to the runtime are done directly from src/runtime/race.c.
22:908e1b5e src/pkg/runtime/race/testdata/select_test.go (Dmitriy Vyukov 2012-11-27 15:04:48 +0400  22)         // See comment in runtime/chan.c:^selectgo.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions