&gt; &quot;truncate a 4G core dump by a couple of bytes and watch GDB try to open it&quot;<p>This comes down to a failure of the binary design. It&#x27;s possible to design a binary format that is uniform enough to handle truncation of a few bytes. To give you one example, you have a header for the binary with pointers to the start and end of each data block and you can keep multiple copies of this header. Another alternative is to specify that each block needs to specify where the data in that block ends. That way, even if you have partial corruption you can read the uncorrupted data blocks.