Skip to content

runtime: refactor assembly for C calls in signal handlers #18352

Open
@bcmills

Description

@bcmills

On change 34501, @minux notes:

It seems the complexity of runtime.sigtramp has got out of control. (sigtramp used to be only called by kernel, now with signal forwarding, it can also be called by foreign C code)

Perhaps we need to separate the concern of saving callee saved register to another function, possbily reusing the existing runtime/cgo crosscall function?

@ianlancetaylor replies:

Signal forwarding applied as soon as we started thinking about combining Go and C code together in the same program. We're just continuing to grapple with it.

Unifying C ABI register saving sounds like a good idea if we can figure out how to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions