[go-nuts] Error when running llvm-goc

2021-06-23 Thread Kavindu Gimhan Zoysa
Hi all, I have build the gollvm and now I am trying to run it. So I run follwing command against a simple go source code. I am getting below error. Really appreciate your input to solve this issue. command : *./bin/llvm-goc test.go* error: *llvm-goc: /home/kavindu/GIT/llvm-project/llvm/tool

Re: [go-nuts] How does stack overflow handles in gollvm

2021-06-23 Thread Kavindu Gimhan Zoysa
Hi Kurtis, Thank you for your input. I am searching how do languages handle stack overflow. Languages like rust, handle this by catching SIGSEGV. In golang, as I found, it was handled by increasing the stack[1], [2] (Sorry if my terms are wrong). I have generated object dump(objdump -d) for g

Re: [go-nuts] How does stack overflow handles in gollvm

2021-06-23 Thread Kurtis Rader
This might be an XY Problem , or your question simply needs more context. Your sample program is an example of infinite recursion. How that is detected is platform specific. It might be done via a special signal. Or it might be done by a syscall to grow the stack returning

[go-nuts] How does stack overflow handles in gollvm

2021-06-23 Thread Kavindu Gimhan Zoysa
Hi all, *package main* *func main() {* * foo()* *}* *func foo() {* * a := 5* * _ = a* * foo()* *}* I have generated the below llvm ir using the command `./bin/llvm-goc -S test.go -dump-ir`. I expected there are some llvm intrinsics that have been used to handle stack overflow. But it is not t

Re: [go-nuts] Hi all,

2021-06-23 Thread 'Than McIntosh' via golang-nuts
Hi, I'll take a look -- stay tuned. Than On Wed, Jun 23, 2021 at 3:04 PM Kavindu Gimhan Zoysa wrote: > By following `gollvm` document I started to build it. But I got this error > in the middle of the build process. > > */home/kavindu/GIT/llvm-project/llvm/tools/gollvm/passes/GC.cpp:20:10: >

[go-nuts] Hi all,

2021-06-23 Thread Kavindu Gimhan Zoysa
By following `gollvm` document I started to build it. But I got this error in the middle of the build process. */home/kavindu/GIT/llvm-project/llvm/tools/gollvm/passes/GC.cpp:20:10: fatal error: llvm/CodeGen/GCStrategy.h: No such file or directory* * 20 | #include "llvm/CodeGen/GCStrategy.h"*

Re: [go-nuts] Golang language specification Document: Composite Literals example is not understandable

2021-06-23 Thread jake...@gmail.com
No that is exactly what I meant. I would never use it, as it seems like obfuscation, but there are those who like to be clever. On Tuesday, June 22, 2021 at 5:36:56 PM UTC-4 Rob 'Commander' Pike wrote: > That creates a slice 101 integers long, which probably isn't what you > meant, which might

[go-nuts] Re: Why does one string concatenation escape, but the other not?

2021-06-23 Thread jake...@gmail.com
It does not answer your question, but possibly provides more clues: https://play.golang.org/p/s9Xnpcx8Mys package main func main() { var a = "b" x := a + a // does not escape x = a + a // does not escape for i := 0; i < 1; i++ { x = a + a // a + a escapes to heap

[go-nuts] Re: WinVerifyTrust WTD_STATEACTION_VERIFY wrong value

2021-06-23 Thread jake...@gmail.com
I would encourage you to file an issue (https://github.com/golang/go/issues), as this seems likely to be a bug. On Tuesday, June 22, 2021 at 8:52:58 PM UTC-4 fedegar...@gmail.com wrote: > Hi all, > I've been struggling a lot to replicate a C++ code that uses > *WinVerifyTrustEx* function in go

Re: [go-nuts] What is the point of gzip Reader.Close?

2021-06-23 Thread Steven Penny
On Wed, Jun 23, 2021 at 5:55 AM a2800276 wrote: > As a rule if I feel that the author of libraries I intend to use are totally > inept morons and can't be trusted to not ask me to arbitrarily call random > unnecessary functions I would shy away from using their library altogether. I want to than

Re: [go-nuts] What is the point of gzip Reader.Close?

2021-06-23 Thread Jesper Louis Andersen
On Wed, Jun 23, 2021 at 12:55 PM a2800276 wrote: > More practically though, most programmers would probably prefer to follow >> guidance provided by the authors of the library they are using because by >> virtue of having written the library, the authors probably understand not >> only the librar

Re: [go-nuts] What is the point of gzip Reader.Close?

2021-06-23 Thread a2800276
> > So I think it can be safe to omit > using gzip Reader Close in the general case. > In the general case it's also safe to ignore all errors, because by definition they only occur in exceptional conditions . More practically though, most programmers would probably prefer to follow guidanc