On Fri, Aug 26, 2016 at 6:35 AM,  <martin.stre...@gmail.com> wrote:
>
> The reason for the morestack call is, that sigtramp is not called in my code
> example. The sa_tramp seems to be overwritten in my call to
> sigaction(int,struct sigaction*,struct sigaction*) and I cannot retrieve the
> original trampoline function via __sigaction(int, struct __sigaction*,
> struct sigaction*), to call it in my handler. Calling it directly would
> probably not work anyway, as sigtrampgo already calls sigreturn, but I want
> to be able to do calculations in the C handler if the Go handler has
> returned. So, I'm quite stuck here. Do you have any ideas?

Interesting.  Maybe we need to change this line in setsig in
runtime/os_darwin.go
    *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u)) = fn
to be
    *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u)) =
unsafe.Pointer(funcPC(sigtramp))

We really don't ever want to call fn here.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to