[go-nuts] Re: Is there a race in exec.CombinedOutput?

2023-10-04 Thread 王富民awaw
That's interesting! Thanks Jason and Brian for educating me! Thanks! On Wednesday, 4 October 2023 at 20:36:10 UTC+8 Brian Candler wrote: > Code reference: > > https://cs.opensource.google/go/go/+/refs/tags/go1.21.1:src/os/exec/exec.go;l=523-565 > > * c.writerDescriptor creates the pipe, and a

Re: [go-nuts] What is a ordinary and exceptional error?

2023-10-04 Thread Jerry Londergaard
On Monday, 2 October 2023 at 12:00:35 am UTC+11 Axel Wagner wrote: On Sun, Oct 1, 2023 at 2:37 PM Jerry Londergaard wrote: I've been thinking about this point as well lately. I think I understand (at least some of) the conditions under which you would call a panic(), but I still don't quite

Re: [go-nuts] Inlining of runtime/internal/atomic.Cas

2023-10-04 Thread Timur Celik
Thank you so much, this solves my issue. Really appreciate your work for the Go project, Ian. Cheers Ian Lance Taylor schrieb am Mi., 4. Okt. 2023, 18:05: > On Wed, Oct 4, 2023 at 5:36 AM Timur Celik wrote: > > > > Why is it that changes in the runtime package's atomic.Cas don't land in > > my

Re: [go-nuts] Inlining of runtime/internal/atomic.Cas

2023-10-04 Thread Ian Lance Taylor
On Wed, Oct 4, 2023 at 5:36 AM Timur Celik wrote: > > Why is it that changes in the runtime package's atomic.Cas don't land in > my build? I suspect it has something to do with inlining of the > function, but even with `-gcflags=-l` the atomic.Cas original > implementation seems to get inlined.

[go-nuts] Inlining of runtime/internal/atomic.Cas

2023-10-04 Thread Timur Celik
Why is it that changes in the runtime package's atomic.Cas don't land in my build? I suspect it has something to do with inlining of the function, but even with `-gcflags=-l` the atomic.Cas original implementation seems to get inlined. Functions that aren't inlined, like atomic.Or have my

[go-nuts] does pprof works on arm64/linux?

2023-10-04 Thread Jacobi Shao
when i do pprof sampling, but I got the following result: File: main Type: cpu Time: Oct 4, 2023 at 5:15pm (CST) Duration: 200.82ms, Total samples = 0 No samples were found with the default sample value type. Try "sample_index" command to analyze different sample values. Entering interactive

[go-nuts] Re: Is there a race in exec.CombinedOutput?

2023-10-04 Thread 'Brian Candler' via golang-nuts
Code reference: https://cs.opensource.google/go/go/+/refs/tags/go1.21.1:src/os/exec/exec.go;l=523-565 * c.writerDescriptor creates the pipe, and a copying function is appended to the slice c.goroutine. This slice contains the functions which will be started in their own goroutines. *

[go-nuts] Build test tag real life example

2023-10-04 Thread sbezverk
Hello, I saw there was some debates about having “test build tag” here: https://github.com/golang/go/issues/21360  and people were asking about real life scenario. Here is one with CGO code, initially I was planning to add stubs for C land calls into blah_test.go file. (I do not need to