type sharedMemSys … func sharedMemMapFile(f *os.File, size int, removeOnClose bool) (*sharedMem, error) { … } // Close unmaps the shared memory and closes the temporary file. If this // sharedMem was created with sharedMemTempFile, Close also removes the file. func (m *sharedMem) Close() error { … } // setWorkerComm configures communication channels on the cmd that will // run a worker process. func setWorkerComm(cmd *exec.Cmd, comm workerComm) { … } // getWorkerComm returns communication channels in the worker process. func getWorkerComm() (comm workerComm, err error) { … } // isInterruptError returns whether an error was returned by a process that // was terminated by an interrupt signal (SIGINT). func isInterruptError(err error) bool { … } // terminationSignal checks if err is an exec.ExitError with a signal status. // If it is, terminationSignal returns the signal and true. // If not, -1 and false. func terminationSignal(err error) (os.Signal, bool) { … } // isCrashSignal returns whether a signal was likely to have been caused by an // error in the program that received it, triggered by a fuzz input. For // example, SIGSEGV would be received after a nil pointer dereference. // Other signals like SIGKILL or SIGHUP are more likely to have been sent by // another process, and we shouldn't record a crasher if the worker process // receives one of these. // // Note that Go installs its own signal handlers on startup, so some of these // signals may only be received if signal handlers are changed. For example, // SIGSEGV is normally transformed into a panic that causes the process to exit // with status 2 if not recovered, which we handle as a crash. func isCrashSignal(signal os.Signal) bool { … }