| ▲ | cookiengineer 5 hours ago | |||||||||||||||||||||||||||||||||||||
> Why would statically linking a library reduce the number of vulnerabilities in it? I use pure go implementations only, and that implies that there's no statically linked C ABI in my binaries. That's what disabling CGO means. | ||||||||||||||||||||||||||||||||||||||
| ▲ | akoboldfrying 4 hours ago | parent [-] | |||||||||||||||||||||||||||||||||||||
What I mean is: There will be bugs* in that pure Go implementation, and static linking means you're baking them in forever. Why is this preferable to dynamic linking? * It's likely that C implementations will have bugs related to dynamic memory allocation that are absent from the Go implementation, because Go is GCed while C is not. But it would be very surprising if there were no bugs at all in the Go implementation. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||