Re: [go-nuts] Query Regarding ASAN C Call from Go Code

2024-03-06 Thread Evgeny Chormonov
I encountered an issue when trying to use pragma *//go:cgo_export_static *in my Go code similar to the *ASAN* code. https://github.com/golang/go/blob/f0d1195e13e06acdf8999188decc63306f9903f5/src/runtime/asan.go#L65 It seems there is a check in the compile utility preventing this.

Re: [go-nuts] Query Regarding ASAN C Call from Go Code

2024-03-04 Thread Ian Lance Taylor
On Mon, Mar 4, 2024 at 9:55 AM Evgeny Chormonov wrote: > > I'm using Linux as my platform, but I'm curious why this solution is > restricted to Linux systems only? > https://github.com/golang/go/blob/master/src/runtime/asan/asan.go#L5 That's just the list of systems for which we support asan.

Re: [go-nuts] Query Regarding ASAN C Call from Go Code

2024-03-04 Thread Evgeny Chormonov
Thanks for your answer, Ian. I've decided to use a code generator based on cgo instead of writing assembly code for each function. I'm using Linux as my platform, but I'm curious why this solution is restricted to Linux systems only?

Re: [go-nuts] Query Regarding ASAN C Call from Go Code

2024-03-03 Thread Ian Lance Taylor
On Sun, Mar 3, 2024 at 1:25 PM Evgeny Chormonov wrote: > > I noticed that ASAN checker in the Go source code is defined using CGO > https://github.com/golang/go/blob/master/src/runtime/asan/asan.go > But the C ASAN functions are called from the Go runtime using assembly code > instead of a

[go-nuts] Query Regarding ASAN C Call from Go Code

2024-03-03 Thread Evgeny Chormonov
I noticed that ASAN checker in the Go source code is defined using CGO https://github.com/golang/go/blob/master/src/runtime/asan/asan.go But the C ASAN functions are called from the Go runtime using assembly code instead of a common CGO call.