Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include "runtime.h"
void
main·pidList(Slice ret, Eface err)
{
ret.array = nil;
ret.len = 0;
ret.cap = 0;
FLUSH(&ret);
runtime·newErrorString(runtime·gostring((byte*)"pidList not implemented"), &err);
runtime·printf("pidList: e.t: %p e.d: %p\n", err.type, err.data);
FLUSH(&err);
}
/*
produces:
unexpected fault address 0x0
fatal error: fault
[signal 0xb code=0x80 addr=0x0 pc=0x40c0b7]
goroutine 1 [running]:
fmt.(*pp).printField(0xc200062000, 0x180808004c0c5f99, 0xc200056400, 0x73, 0x0, ...)
/home/bpowers/go/src/pkg/fmt/print.go:759 +0x273
fmt.(*pp).doPrintf(0xc200062000, 0x51f490, 0xb, 0x7ff48c48df60, 0x1, ...)
/home/bpowers/go/src/pkg/fmt/print.go:1102 +0x1305
fmt.Sprintf(0x51f490, 0xb, 0x7ff48c48df60, 0x1, 0x1, ...)
/home/bpowers/go/src/pkg/fmt/print.go:228 +0x65
log.Printf(0x51f490, 0xb, 0x7ff48c48df60, 0x1, 0x1, ...)
/home/bpowers/go/src/pkg/log/log.go:276 +0x4d
main.main()
/var/unsecure/src/psm/main.go:193 +0x273
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment