We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
tip (e8de596)
No. This starts to happen since cgo callback changes (CL 258938).
go env
linux/amd64
Build the following program using MSAN, where it calls from C to Go passing a C struct with padding.
x.go
package main // Test passing C struct to exported Go function. /* #include <stdint.h> typedef struct { uintptr_t x, y; char b; } T; void CF(int x); */ import "C" //export F func F(t C.T) { println(t.x, t.y, t.b) } func main() { C.CF(C.int(0)) }
x.c
#include <stdint.h> #include <stdlib.h> typedef struct { uintptr_t x, y; char b; } T; extern void F(T); void CF(int x) { T *t = malloc(sizeof(T)); t->x = x; t->y = x; t->b = (char)x; F(*t); }
Program runs okay, prints 0 0 0.
0 0 0
$ CC=clang go build -msan . $ ./x Uninitialized bytes in __msan_check_mem_is_initialized at offset 17 inside [0x7fff51f33f00, 24) ==893435==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x4f5368 in msancall /usr/local/google/home/cherryyz/src/go-tip/src/runtime/msan_amd64.s:78 SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/local/google/home/cherryyz/src/go-tip/src/runtime/msan_amd64.s:78 in msancall Exiting
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/270859 mentions this issue: cmd/compile, runtime: use __msan_memmove for moving data
cmd/compile, runtime: use __msan_memmove for moving data
Sorry, something went wrong.
Marking as a release blocker because this is a regression from 1.15.
07cba70
No branches or pull requests
What version of Go are you using (
go version
)?tip (e8de596)
Does this issue reproduce with the latest release?
No. This starts to happen since cgo callback changes (CL 258938).
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
Build the following program using MSAN, where it calls from C to Go passing a C struct with padding.
x.go
x.c
What did you expect to see?
Program runs okay, prints
0 0 0
.What did you see instead?
The text was updated successfully, but these errors were encountered: