fbe9724cc3
With -buildmode=c-archive, initsig is called before the memory allocator has been initialized. The code was doing a memory allocation because of the call to funcPC(sigtramp). When escape analysis is fully implemented, that call should not allocate. For now, finesse the issue by calling a C function to get the C function pointer value of sigtramp. When returning from a call from C to a Go function, a deferred function is run to go back to syscall mode. When the call occurs on a non-Go thread, that call sets g to nil, making it impossible to add the _defer struct back to the pool. Just drop it and let the garbage collector clean it up. Reviewed-on: https://go-review.googlesource.com/33675 From-SVN: r242992 |
||
---|---|---|
.. | ||
arch.h | ||
array.h | ||
defs.h | ||
env_posix.c | ||
getncpu-bsd.c | ||
getncpu-irix.c | ||
getncpu-linux.c | ||
getncpu-none.c | ||
getncpu-solaris.c | ||
go-alloc.h | ||
go-assert.c | ||
go-assert.h | ||
go-breakpoint.c | ||
go-caller.c | ||
go-callers.c | ||
go-cdiv.c | ||
go-cgo.c | ||
go-construct-map.c | ||
go-ffi.c | ||
go-fieldtrack.c | ||
go-libmain.c | ||
go-main.c | ||
go-matherr.c | ||
go-memclr.c | ||
go-memcmp.c | ||
go-memequal.c | ||
go-memmove.c | ||
go-nanotime.c | ||
go-new.c | ||
go-nosys.c | ||
go-now.c | ||
go-reflect-call.c | ||
go-runtime-error.c | ||
go-setenv.c | ||
go-signal.c | ||
go-string.h | ||
go-strslice.c | ||
go-type-complex.c | ||
go-type-float.c | ||
go-type-identity.c | ||
go-type-string.c | ||
go-type.h | ||
go-typedesc-equal.c | ||
go-unsafe-new.c | ||
go-unsafe-newarray.c | ||
go-unsafe-pointer.c | ||
go-unsetenv.c | ||
go-unwind.c | ||
go-varargs.c | ||
goc2c.c | ||
heapdump.c | ||
malloc.goc | ||
malloc.h | ||
mcache.c | ||
mcentral.c | ||
mem_posix_memalign.c | ||
mem.c | ||
mfixalloc.c | ||
mgc0.c | ||
mgc0.h | ||
mheap.c | ||
msize.c | ||
panic.c | ||
parfor.c | ||
print.c | ||
proc.c | ||
rtems-task-variable-add.c | ||
runtime_c.c | ||
runtime.h | ||
thread-linux.c | ||
thread-sema.c | ||
thread.c | ||
yield.c |