Re: [go-nuts] cgo & long jump

2019-12-10 Thread Ian Lance Taylor
On Tue, Dec 10, 2019 at 2:20 AM wrote: > > On Monday 09 December 2019 15:55:18 Ian Lance Taylor wrote: > > On Mon, Dec 9, 2019 at 10:30 AM wrote: > > > > > > So should I interpret your answer as long jumps are not supported and > > > caller of C function from Go must ensure that called C

Re: [go-nuts] cgo & long jump

2019-12-10 Thread pali
On Monday 09 December 2019 15:55:18 Ian Lance Taylor wrote: > On Mon, Dec 9, 2019 at 10:30 AM wrote: > > > > So should I interpret your answer as long jumps are not supported and > > caller of C function from Go must ensure that called C function would > > not call longjmp()? > > Correct: Go

Re: [go-nuts] cgo & long jump

2019-12-09 Thread Ian Lance Taylor
On Mon, Dec 9, 2019 at 10:30 AM wrote: > > So should I interpret your answer as long jumps are not supported and > caller of C function from Go must ensure that called C function would > not call longjmp()? Correct: Go code should not call C code that calls longjmp. (Well, it's OK to call C

Re: [go-nuts] cgo & long jump

2019-12-09 Thread Dan Kortschak
This breaks my already fairly tenuous grasp of the progression of time; what do you mean by since "since then" when that event is a personal that is in the past (do you mean between going to sleep in the future and waking up in the past). Time [travel] is hard. On Mon, 2019-12-09 at 11:24 -0800,

Re: [go-nuts] cgo & long jump

2019-12-09 Thread Robert Engels
the setjmp address() and set it and call f2(). -Original Message- >From: p...@cpan.org >Sent: Dec 9, 2019 12:30 PM >To: Ian Lance Taylor >Cc: golang-nuts >Subject: Re: [go-nuts] cgo & long jump > >On Monday 09 December 2019 10:18:26 Ian Lance Taylor wrote: >>

Re: [go-nuts] cgo & long jump

2019-12-09 Thread Michael Jones
The longjmp() facility is a wild, dangerous, improper, and popular mechanism. It's premise is that the app can go back in time, like you waking up last week with no knowledge of what happened since then. If you can follow that analogy, then imagine your surprise when external things you did last

Re: [go-nuts] cgo & long jump

2019-12-09 Thread pali
On Monday 09 December 2019 10:18:26 Ian Lance Taylor wrote: > On Mon, Dec 9, 2019 at 8:57 AM wrote: > > > > I would like to ask some technical question about cgo and long jumps. > > > > In Go I have written shared library which exports C API and therefore > > can be called by other C

Re: [go-nuts] cgo & long jump

2019-12-09 Thread Ian Lance Taylor
On Mon, Dec 9, 2019 at 8:57 AM wrote: > > I would like to ask some technical question about cgo and long jumps. > > In Go I have written shared library which exports C API and therefore > can be called by other C applications. This my library is compiling with > cgo, more precisely via: go build

[go-nuts] cgo & long jump

2019-12-09 Thread pali
Hello! I would like to ask some technical question about cgo and long jumps. In Go I have written shared library which exports C API and therefore can be called by other C applications. This my library is compiling with cgo, more precisely via: go build -buildmode=c-shared -compiler gc Now I