Re: [go-nuts] Issue with CGO and GOGC when dealing with large buffers

2024-12-03 Thread Jason E. Aten
Robert -- no worries. I appreciate the supportive comments. Sorry for the confusion. I realized the suggestions were far too long and redundant to be helpful, and I was a little embarrassed by them after Ian pointed out that the LLM output was flat out wrong. Laelem -- Once you've made file globa

Re: [go-nuts] Issue with CGO and GOGC when dealing with large buffers

2024-12-03 Thread robert engels
Sorry, you did delete a message - which was confusing... On Monday, December 2, 2024 at 4:44:09 PM UTC-6 Jason E. Aten wrote: > Sorry. I've deleted those unhelpful suggestions. > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

Re: [go-nuts] Issue with CGO and GOGC when dealing with large buffers

2024-12-03 Thread Lealem Amedie
Thank you all for your input! I was able to resolve this by making the `file` variable global and pinning it in memory before the wolfSSL reads/writes with the snippet below. I've pushed the new code to the repo https://github.com/lealem47/go-wolfssl-https-server. *var p runtime.Pinn

Re: [go-nuts] Issue with CGO and GOGC when dealing with large buffers

2024-12-03 Thread Robert Engels
This is exactly why people have moved to memory safe languages for critical infrastructure. Just to hard to get right and have the server be malleable. On Dec 3, 2024, at 3:31 PM, Jason E. Aten wrote:Lealem, I wasn't able to reproduce the error you were seeing (perhaps write a test case that does

Re: [go-nuts] Issue with CGO and GOGC when dealing with large buffers

2024-12-03 Thread Jason E. Aten
Lealem, I wasn't able to reproduce the error you were seeing (perhaps write a test case that does?), but when asking for a 5MB payload, I was able to make the go-wolfssl-https-server repro server crash by itself on an invalid wolfssh free() call. I'm not sure at which layer the bug is, but ther

[go-nuts] Go 1.23.4 and Go 1.22.10 are released

2024-12-03 Thread announce
Hello gophers, We have just released Go versions 1.23.4 and 1.22.10, minor point releases. View the release notes for more information: https://go.dev/doc/devel/release#go1.23.4 You can download binary and source distributions from the Go website: https://go.dev/dl/ To compile from source using

[go-nuts] Getting new coverage output format from go test -cover

2024-12-03 Thread Paul Chesnais (papacharlie)
Hello, I'd like to be able to merge the data from the output of `go test -cover` with the output of a run using `go build -cover` but it seems that there's no way to translate the "legacy" format from go test into the new binary format. This means it's not possible to use the built-in tooling l

Re: [go-nuts] Where should I define the errors in a Go project?

2024-12-03 Thread Mike Schinkel
> On Dec 2, 2024, at 10:03 PM, JUAN DIEGO LATORRE RAMIREZ > wrote: > > I am trying to standardize an architecture for my Go projects, so I have a > file structure like this: > > ├── go.mod > ├── go.sum > ├── internal > │ ├── domain > │ │ ├── models > │ │ │ └

Re: [go-nuts] Is it possible to compile a Go program without jump tables ?

2024-12-03 Thread 'Karolina GORNA' via golang-nuts
Yes thank you Andrey, I noticed this shortly after sending the example in the email. I redid the procedure on the code below which is not optimized by the Go compiler, and I get the same conclusions as before, you can check. Best, Karolina *switch-go-improved/

Re: [go-nuts] Is it possible to compile a Go program without jump tables ?

2024-12-03 Thread Andrey Bokhanko
понедельник, 2 декабря 2024 г. в 13:25:22 UTC+3, Karolina GORNA: *switch-go/main.go*-- package main import "fmt" func main() { x := 10 switch x { case 1: fmt.Println("One") case 5: fmt.Println("Five") case 10:

Re: [go-nuts] Is it possible to compile a Go program without jump tables ?

2024-12-03 Thread 'Karolina GORNA' via golang-nuts
I understand, thank you. On Monday, December 2, 2024 at 8:47:31 PM UTC+1 Keith Randall wrote: > Ah, I see, there are still a few left in the runtime. The runtime forces > optimizations on even when -N is used. > > So no, I don't think you can do what you want (without hacking the > compiler to