Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: traceback throw from VDSO reachable via raw asmcgocall #50504

Open
prattmic opened this issue Jan 7, 2022 · 1 comment
Open

runtime: traceback throw from VDSO reachable via raw asmcgocall #50504

prattmic opened this issue Jan 7, 2022 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Jan 7, 2022

This split from #49182 (comment).

On 386, __kernel_vsyscall is reachable from cgo_start_thread, which is called via asmcgocall.

The signal handler won't properly detect raw asmcgocall calls as cgo calls because sighandler checks g.m.incgo, which is only set in cgocall.

I believe the correct approach here is to push g.m.incgo (and probably g.m.ncgo) adjustments from cgocall to asmcgocall.

@prattmic prattmic added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 7, 2022
@prattmic prattmic added this to the Backlog milestone Jan 7, 2022
@gopherbot
Copy link

Change https://golang.org/cl/376656 mentions this issue: runtime: skip TestSegv traceback check on 386

gopherbot pushed a commit that referenced this issue Jan 7, 2022
The VDSO (__kernel_vsyscall) is reachable via
asmcgocall(cgo_start_thread) on linux-386, which causes traceback to
throw.

Fixes #49182.
For #50504.

Change-Id: Idb78cb8de752203ce0ed63c2dbd2d12847338688
Reviewed-on: https://go-review.googlesource.com/c/go/+/376656
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
jproberts pushed a commit to jproberts/go that referenced this issue Jun 21, 2022
The VDSO (__kernel_vsyscall) is reachable via
asmcgocall(cgo_start_thread) on linux-386, which causes traceback to
throw.

Fixes golang#49182.
For golang#50504.

Change-Id: Idb78cb8de752203ce0ed63c2dbd2d12847338688
Reviewed-on: https://go-review.googlesource.com/c/go/+/376656
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Triage Backlog
Development

No branches or pull requests

2 participants