I once had a bug with Apache Rivet, where Tcl was linked to one version of the 'stat' struct, and Apache to another, meaning that, on occasion, the wrong size thing would get written to the wrong place and overwrite some memory that would, at some later point, cause an error. It was a bitch to debug.