Closed atishnazir closed 3 years ago
Hey thanks for the PR! I'll want some time to play with it myself, but I like where your head is at. Debugging has generally been a pain with this library, and moving all the coercions to a single C source file was something I had considered just from a compilation speed standpoint.
I got a few things up in the air at the moment, but I'll dig into it when I get a chance.
Hi, Have you had a chance to tinker with this change? I've been using for a few weeks and found it invaluable (in the end the pointer spray was due to the Go GC finalising something it shouldn't have). I've not got any better suggestions.
Thanks
Yea sorry it's been a crazy couple weeks, I'll take a look tomorrow I promise.
Looks good. You are right that it makes a huge difference to debugging.
In terms of the Go GC finalizing something it shouldn't - that is behavior I've experienced before too. When I replicate it I'm able to replicate it consistently. But then I seemingly can't get it to happen in other areas working exactly the same way. There are actually references to this issue in some of the examples. One way of dealing with it is here and another here. It truly is bizarre and I hope to figure out the cause some day.
Will merge and tag this for now.
Background: I'm trying to trackdown a C buffer overflow somewhere in my project and really need to be able to use delve/gdb to catch those segfaults. Unfortunately when trying to produce debug builds the linker falls over when trying to deal with the shim inline functions:
As a fix I've converted all the inline functions into defined symbols and now I am able to produce debug builds that I can run with delve (under Goland).
I'm undecided whether this is this right course of action so opening the PR more as a discussion piece.