[go-nuts] Symbol of const string are not exported by compiler

2024-05-30 Thread Benoît Marguerie
Hello All, I discovered a "strange" behavior doing a simple operation. I defined 2 const : one integer and one string. With delve (or other debugger), I'm able to consult the const integer value but not the const string value. Delve team explained me that the go compiler doesn't export symbol

Re: [go-nuts] Symbol of const string are not exported by compiler

2024-05-30 Thread Jan Mercl
On Thu, May 30, 2024 at 10:34 AM Benoît Marguerie wrote: > I discovered a "strange" behavior doing a simple operation. > I defined 2 const : one integer and one string. With delve (or other > debugger), I'm able to consult the const integer value but not the const > string value. Delve team exp

Re: [go-nuts] Symbol of const string are not exported by compiler

2024-05-30 Thread Benoît Marguerie
Of course! The code can be really simple like this: *const myValueStr = "try"const myValueInt = 12* *func DoSomething() { fmt.Println("Instruction only to put a breakpoint")}* and the result with delve: *(dlv) print %v myValueInt12(dlv) print %v myValueStrCommand failed: could not

Re: [go-nuts] Symbol of const string are not exported by compiler

2024-05-30 Thread Benoît Marguerie
or, in a easier way, a full "copy/paste" example of code: package main import "fmt" const myValueStr = "try" const myValueInt = 12 func main() { fmt.Println("Instruction only to put a breakpoint") } Le jeudi 30 mai 2024 à 10:53:50 UTC+2, Benoît Marguerie a écrit : > Of course! > The code can

Re: [go-nuts] Memory operations hung in semacquire state, GC routine parked while holding semaphore?

2024-05-30 Thread 'Alex Kristiansen' via golang-nuts
Thanks for the response Michael. > It looks like a Windows minidump (unsurprisingly) can't follow the relation. A regular goroutine stack trace dump that gets emitted on a forced exit or crash is able to show both sides of the system stack switch with a little bit of configuration. Yeah, that

[go-nuts] [security] Go 1.22.4 and Go 1.21.11 pre-announcement

2024-05-30 Thread announce
Hello gophers, We plan to issue Go 1.22.4 and Go 1.21.11 during US business hours on Tuesday, June 4. These minor releases include PRIVATE security fixes to the standard library, covering the following CVE: - CVE-2024-24790 Following our security policy, this is the pre-announcement of

Re: [go-nuts] Symbol of const string are not exported by compiler

2024-05-30 Thread Kurtis Rader
Your question should have included more information such as the Go version. Nonetheless, I don't see how Delve is able to resolve "myValueInt" in your example. I modified your code to include non-const versions of the symbols: package main import "fmt" const constValueStr = "abc" const constVa