Tamás, You have an off-by-one error. For 32-bit ints, maxInt is 1<<31 - 1, not 1<<31.
For GOARCH=386, constant 2147483648 overflows int array bound is too large Peter On Saturday, June 6, 2020 at 3:35:27 AM UTC-4, Tamás Gulácsi wrote: > > Use 1<<31 instead of 1024. > And ifthe C side won't modify/free the *uchar, then you don't need the > copy. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6047325c-72c6-46b5-9d0b-e8657373fd0fo%40googlegroups.com.