[go: nahoru, domu]

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

checkescape conflates source files with the same name in different packages #10556

Open
nixprime opened this issue Jun 20, 2024 · 0 comments
Open
Labels
type: bug Something isn't working

Comments

@nixprime
Copy link
Member

Description

checkescape (//tools/checkescape) uses go tool objdump to produce a mapping from source lines to function calls at those lines (checkescape.go:loadObjdump()). However, go tool objdump only prints the basename for each source line, e.g.:

TEXT gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).MRemap(SB) pkg/sentry/mm/syscalls.go
  syscalls.go:348       0x8737e0                4c8da42458fcffff                LEAQ 0xfffffc58(SP), R12
...

This was discovered in the context of #9072, where checkescape confuses kernel/syscalls.go:494 (kernel.IncrementUnimplementedSyscallCounter()) for mm/syscalls.go:494 (after this change, the call to MM.findAvailableLocked() in MM.MRemap()) and emits a false positive:

arm64...checkescape: pkg/sentry/kernel/syscalls.go:494:6: stack: possible split on function entry → gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).findAvailableLocked (GOOARCH=arm64, GOOS=linux)
amd64...checkescape: pkg/sentry/kernel/syscalls.go:494:6: stack: possible split on function entry → gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).findAvailableLocked (GOOARCH=amd64, GOOS=linux)

AFAIU the cleanest fix would be to plumb a flag through go tool objdump (Go: cmd/objdump) to cmd/internal/objfile that causes objfile.Disasm.Print() to print full filenames.

Steps to reproduce

No response

runsc version

No response

docker version (if using docker)

No response

uname

No response

kubectl (if using Kubernetes)

No response

repo state (if built from source)

No response

runsc debug logs (if available)

No response

@nixprime nixprime added the type: bug Something isn't working label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant