Re: [go-nuts] Is this a typo/bug in runtime.heapBitsSetType?

2021-06-09 Thread steve wang
Thanks for your anwer. It's my misreading. On Thursday, June 10, 2021 at 2:25:31 PM UTC+8 axel.wa...@googlemail.com wrote: > The comment says "Advance two words", so I assume no? > > On Thu, Jun 10, 2021 at 6:14 AM steve wang wrote: > >> go 1.16.5 >> runtime/mbitmap.go:946 >> >>1. switch h.

[go-nuts] How to compile a go program which uses cgo to llvm IR?

2021-06-09 Thread Peng Deng
Hi, I have the following program package main /* #include static void SayHello(const char* s) { puts(s); } */ import "C" func main() { C.SayHello(C.CString("Hello, World\n")) } I want to compile this program to LLVM IR with gollvm, the compilation instruction is as follows: llvm-goc

Re: [go-nuts] Is this a typo/bug in runtime.heapBitsSetType?

2021-06-09 Thread 'Axel Wagner' via golang-nuts
The comment says "Advance two words", so I assume no? On Thu, Jun 10, 2021 at 6:14 AM steve wang wrote: > go 1.16.5 > runtime/mbitmap.go:946 > >1. switch h.shift { >2. case 0: >3. *h.bitp &^= mask3 << 0 >4. *h.bitp |= hb << 0 >5. case 1: >6. *h.bitp &^= mask3 << 1 >7.

Re: [go-nuts] how break point work in multi-thread multi-core linux?

2021-06-09 Thread Marcin Romaszewicz
Threads are scheduled by the operating system, which has many syscalls to manage their execution status. When Delve hits an interrupt (trap) instruction for a breakpoint, it asks the OS to suspend all the other OS threads. Goroutine thread stacks are managed by Go, and Delve inspects all those stac

[go-nuts] Is this a typo/bug in runtime.heapBitsSetType?

2021-06-09 Thread steve wang
go 1.16.5 runtime/mbitmap.go:946 1. switch h.shift { 2. case 0: 3. *h.bitp &^= mask3 << 0 4. *h.bitp |= hb << 0 5. case 1: 6. *h.bitp &^= mask3 << 1 7. *h.bitp |= hb << 1 8. case 2: 9. *h.bitp &^= mask2 << 2 10. *h.bitp |= (hb & mask2) << 2 11. // Two words written

[go-nuts] Re: Warning for look alike Unicode characters

2021-06-09 Thread Tamás Gulácsi
strings.EqualFold ? Delta a következőt írta (2021. június 9., szerda, 23:30:04 UTC+2): > Does the Go tool has any warning system for look alike Unicode > characters. > > http://www.unicode.org/Public/security/10.0.0/confusables.txt > > > In rustc - > > https://github.com/rust-lang/rust/blob/mas

[go-nuts] Warning for look alike Unicode characters

2021-06-09 Thread Delta
Does the Go tool has any warning system for look alike Unicode characters. http://www.unicode.org/Public/security/10.0.0/confusables.txt In rustc - https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/lexer/unicode_chars.rs -- You received this message because you are subs

[go-nuts] how break point work in multi-thread multi-core linux?

2021-06-09 Thread xie cui
as for as i known, in linux, seting a breakpoint means we set int 3 instruction to the right place, it's easy to understand in single core os for me. but what happen when it's multi-core multi-thread enviroment like go program. using goland when set a breakpoint, when the breakpoint hit, it see

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2021-06-09 Thread Shiva
I have now duped all of the linux files and created nsx variants, I've also set the environment variables GOOS to nsx and GOARCH to amd64. When I tried to run make.bat (If you try to port and run bootstrap.sh on windows, you get an error message directing you to run make.bat instead on windows),