-
Notifications
You must be signed in to change notification settings - Fork 18.1k
runtime: reflect.methodValueCall cannot be unwound #6619
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
Labels
Milestone
Comments
The problem seems to be in here: runtime: unknown argument frame size for reflect.methodValueCall called from 0x425822 [runtime.call16] reflect.methodValueCall() /usr/local/google/home/cshapiro/go/src/pkg/reflect/asm_amd64.s:26 +0x24 fp=0x7f8bb38017e8 runtime.call16(0xc2152a9000, 0xc2152aa000) /usr/local/google/home/cshapiro/go/src/pkg/runtime/asm_amd64.s:338 +0x32 fp=0x7f8bb3801800 reflect.Value.call(0x57ac40, 0xc2152a9000, 0x130, 0x5c6960, 0x4, ...) /usr/local/google/home/cshapiro/go/src/pkg/reflect/value.go:474 +0x113d fp=0x7f8bb3801ab8 reflect.methodValueCall is an assembly function, and it is varargs. The compiler is supposed to record the size of the arguments in the caller using PCDATA_ArgSize. But in this case the caller is itself assembly code, runtime.call16, so there is no argument size data. I think the fix might be for call16 and friends in runtime/asm_amd64.s to record argument size data, which they would do using some sort of PCDATA instruction. |
call16 can't record the argument size/types, at least not statically. It is likely different on each call. We could record something at runtime, but then we already do. The first argument to call16 is a FuncVal* for which we can read the function pointer, look up the Func*, and we have the info. We'd then just need to special case traceback_*.c to know how to compute the argument info for the call* routines. |
I don't see how this can happen on a clean checkout: runtime.gentraceback(0x41173e, 0x7f8bb3801600, 0x0, 0xc21024e000, 0x0, ...) /usr/local/google/home/cshapiro/go/src/pkg/runtime/traceback_x86.c:132 +0x71e addstackroots(0xc21024e000) /usr/local/google/home/cshapiro/go/src/pkg/runtime/mgc0.c:1775 +0x155 addroots() /usr/local/google/home/cshapiro/go/src/pkg/runtime/mgc0.c:1857 +0x204 At tip right now, ScanStacksByFrames = 0, so addstackroots should not be calling gentraceback. Can you explain why it is? |
Owner changed to @randall77. |
This issue was closed by revision 85138da. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: