[go-nuts] Re: //go:norace doesn't effect ABI0 wrapper

2022-11-30 Thread Jarrett Kuklis
I tried that and received a SIGBUS CGO_ENABLED=0 GOARCH=amd64 gotip run -race ./example/main.go signal: bus error On Wednesday, November 30, 2022 at 1:24:08 PM UTC-5 cuong.m...@gmail.com wrote: > See my suggestion here: > https://github.com/ebitengine/purego/issues/71#issuecomment-1332545306

[go-nuts] [security] Go 1.19.4 and Go 1.18.9 pre-announcement

2022-11-30 Thread announce
Hello gophers, We plan to issue Go 1.19.4 and Go 1.18.9 during US business hours on Tuesday, December 6. These minor releases include PRIVATE security fixes to the standard library. Following our security policy, this is the pre-announcement of those releases. Thanks, Jenny and Cherry for the

[go-nuts] Re: //go:norace doesn't effect ABI0 wrapper

2022-11-30 Thread Cuong Manh Le
See my suggestion here: https://github.com/ebitengine/purego/issues/71#issuecomment-1332545306 For //go:norace and ABI wrapper functions, there's no instrument emitted. Your problem is that the compiler know there's a native ABI0 implementation for x_cgo_init, so calling it from assembly is f

Re: [go-nuts] How to fix an awful marshal reflection hack

2022-11-30 Thread burak serdar
On Wed, Nov 30, 2022 at 10:17 AM 'Mark' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Yes, I'd already tried that (that's what I started with) and unfortunately > it doesn't work. > It fails if field.Elem() is nil. Try this: kind = field.Type().Elem().Kind() > > On Wednesday, Nove

Re: [go-nuts] How to fix an awful marshal reflection hack

2022-11-30 Thread 'Mark' via golang-nuts
Yes, I'd already tried that (that's what I started with) and unfortunately it doesn't work. On Wednesday, November 30, 2022 at 3:37:47 PM UTC bse...@computer.org wrote: > On Wed, Nov 30, 2022 at 5:29 AM 'Mark' via golang-nuts < > golan...@googlegroups.com> wrote: > >> I have this code which work

[go-nuts] //go:norace doesn't effect ABI0 wrapper

2022-11-30 Thread Jarrett Kuklis
I am one of the main contributors to ebitengine/purego a library that aims to call into C code without invoking the C compiler. The main platform of support is darwin on arm64 and amd64. It uses //cgo_import_dynamic comments to get the symbols and calls th

Re: [go-nuts] How to fix an awful marshal reflection hack

2022-11-30 Thread burak serdar
On Wed, Nov 30, 2022 at 5:29 AM 'Mark' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I have this code which works but has a horrible hack: > ... > nullable := false > kind := field.Kind() // field's type is reflect.Value > if kind == reflect.Ptr { > This should work: kind = field.Elem

[go-nuts] Re: Looking Backend Dev Learning Resources

2022-11-30 Thread Christoph Berger
If you know the basics of Go already, Effective Go and the Go FAQ are good starting points for learning what idiomatic Go is like and why certain decisions in the language design were made. On Saturday, November 26, 2022 at 11:37:29 AM U

[go-nuts] How to fix an awful marshal reflection hack

2022-11-30 Thread 'Mark' via golang-nuts
I have this code which works but has a horrible hack: ... nullable := false kind := field.Kind() // field's type is reflect.Value if kind == reflect.Ptr { // FIXME How can I improve upon this truly awful hack? switch field.Type().String() { case "*int", "*int8", "*uint8", "*int16", "*ui