An edited version of a rant I posted internally at Google. It applies here too:
Even small CLs deserve a little attention to detail. Put the CL in context.It's likely that a day or month or a year from now someone will search the history log for the change but not be able to find it because all the important information is in the code but not identified in the CL description.In short, write the CL description for someone in the future who might be looking for your change because of a faint memory of its relevance but without the specifics handy.I just looked around and found this one by Austin Clements, which is very good because it satisfies these criteria: What, why, and background.Author: Austin Clements <aus...@google.com>Date: Fri Dec 19 16:16:17 2014 -0500
runtime: run libc SIGSETXID and SIGCANCEL handlers on signal stack
These signals are used by glibc to broadcast setuid/setgid to all
threads and to send pthread cancellations. Unlike other signals, the
Go runtime does not intercept these because they must invoke the libc
handlers (see issues #3871 and #6997). However, because 1) these
signals may be issued asynchronously by a thread running C code to
another thread running Go code and 2) glibc does not set SA_ONSTACK
for its handlers, glibc's signal handler may be run on a Go stack.
Signal frames range from 1.5K on amd64 to many kilobytes on ppc64, so
this may overflow the Go stack and corrupt heap (or other stack) data.
Fix this by ensuring that these signal handlers have the SA_ONSTACK
flag (but not otherwise taking over the handler).
This has been a problem since Go 1.1, but it's likely that people
haven't encountered it because it only affects setuid/setgid and
pthread_cancel.
Fixes #9600.
What's really sad is how often I find myself telling people this. It should be part of our culture, not something an old fogey needs to beg for regularly.Please heed my plea and write good CL descriptions for Go—and for any other project you work on.