Skip to content

runtime: fix tests when running with -msan #64572

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/runtime/msan_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// Called from msanread.
TEXT runtime·domsanread(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1
MOVQ sz+8(FP), RARG1
// void __msan_read_go(void *addr, uintptr_t sz);
MOVQ $__msan_read_go(SB), AX
JMP msancall<>(SB)
Expand All @@ -37,23 +37,23 @@ TEXT runtime·domsanread(SB), NOSPLIT, $0-16
// Called from instrumented code.
TEXT runtime·msanwrite(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1
MOVQ sz+8(FP), RARG1
// void __msan_write_go(void *addr, uintptr_t sz);
MOVQ $__msan_write_go(SB), AX
JMP msancall<>(SB)

// func runtime·msanmalloc(addr unsafe.Pointer, sz uintptr)
TEXT runtime·msanmalloc(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1
MOVQ sz+8(FP), RARG1
// void __msan_malloc_go(void *addr, uintptr_t sz);
MOVQ $__msan_malloc_go(SB), AX
JMP msancall<>(SB)

// func runtime·msanfree(addr unsafe.Pointer, sz uintptr)
TEXT runtime·msanfree(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1
MOVQ sz+8(FP), RARG1
// void __msan_free_go(void *addr, uintptr_t sz);
MOVQ $__msan_free_go(SB), AX
JMP msancall<>(SB)
Expand All @@ -62,7 +62,7 @@ TEXT runtime·msanfree(SB), NOSPLIT, $0-16
TEXT runtime·msanmove(SB), NOSPLIT, $0-24
MOVQ dst+0(FP), RARG0
MOVQ src+8(FP), RARG1
MOVQ size+16(FP), RARG2
MOVQ sz+16(FP), RARG2
// void __msan_memmove(void *dst, void *src, uintptr_t sz);
MOVQ $__msan_memmove(SB), AX
JMP msancall<>(SB)
Expand Down
10 changes: 5 additions & 5 deletions src/runtime/msan_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Called from msanread.
TEXT runtime·domsanread(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1
MOVD sz+8(FP), RARG1
// void __msan_read_go(void *addr, uintptr_t sz);
MOVD $__msan_read_go(SB), FARG
JMP msancall<>(SB)
Expand All @@ -25,23 +25,23 @@ TEXT runtime·domsanread(SB), NOSPLIT, $0-16
// Called from instrumented code.
TEXT runtime·msanwrite(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1
MOVD sz+8(FP), RARG1
// void __msan_write_go(void *addr, uintptr_t sz);
MOVD $__msan_write_go(SB), FARG
JMP msancall<>(SB)

// func runtime·msanmalloc(addr unsafe.Pointer, sz uintptr)
TEXT runtime·msanmalloc(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1
MOVD sz+8(FP), RARG1
// void __msan_malloc_go(void *addr, uintptr_t sz);
MOVD $__msan_malloc_go(SB), FARG
JMP msancall<>(SB)

// func runtime·msanfree(addr unsafe.Pointer, sz uintptr)
TEXT runtime·msanfree(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1
MOVD sz+8(FP), RARG1
// void __msan_free_go(void *addr, uintptr_t sz);
MOVD $__msan_free_go(SB), FARG
JMP msancall<>(SB)
Expand All @@ -50,7 +50,7 @@ TEXT runtime·msanfree(SB), NOSPLIT, $0-16
TEXT runtime·msanmove(SB), NOSPLIT, $0-24
MOVD dst+0(FP), RARG0
MOVD src+8(FP), RARG1
MOVD size+16(FP), RARG2
MOVD sz+16(FP), RARG2
// void __msan_memmove(void *dst, void *src, uintptr_t sz);
MOVD $__msan_memmove(SB), FARG
JMP msancall<>(SB)
Expand Down
10 changes: 5 additions & 5 deletions src/runtime/msan_loong64.s
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Called from msanread.
TEXT runtime·domsanread(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1
MOVV sz+8(FP), RARG1
// void __msan_read_go(void *addr, uintptr_t sz);
MOVV $__msan_read_go(SB), FARG
JMP msancall<>(SB)
Expand All @@ -25,23 +25,23 @@ TEXT runtime·domsanread(SB), NOSPLIT, $0-16
// Called from instrumented code.
TEXT runtime·msanwrite(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1
MOVV sz+8(FP), RARG1
// void __msan_write_go(void *addr, uintptr_t sz);
MOVV $__msan_write_go(SB), FARG
JMP msancall<>(SB)

// func runtime·msanmalloc(addr unsafe.Pointer, sz uintptr)
TEXT runtime·msanmalloc(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1
MOVV sz+8(FP), RARG1
// void __msan_malloc_go(void *addr, uintptr_t sz);
MOVV $__msan_malloc_go(SB), FARG
JMP msancall<>(SB)

// func runtime·msanfree(addr unsafe.Pointer, sz uintptr)
TEXT runtime·msanfree(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1
MOVV sz+8(FP), RARG1
// void __msan_free_go(void *addr, uintptr_t sz);
MOVV $__msan_free_go(SB), FARG
JMP msancall<>(SB)
Expand All @@ -50,7 +50,7 @@ TEXT runtime·msanfree(SB), NOSPLIT, $0-16
TEXT runtime·msanmove(SB), NOSPLIT, $0-24
MOVV dst+0(FP), RARG0
MOVV src+8(FP), RARG1
MOVV size+16(FP), RARG2
MOVV sz+16(FP), RARG2
// void __msan_memmove(void *dst, void *src, uintptr_t sz);
MOVV $__msan_memmove(SB), FARG
JMP msancall<>(SB)
Expand Down