DWARF call frame information incorrect in the presence of unsafe foreign calls
Unsafe foreign calls result in adjustments to
$rsp made in the NCG to comply with calling convention alignment requirements (see
X86.CodeGen.genCCall64'). Unfortunately, this happens after we've generated unwind information. This results in incorrect unwinding information for
$rsp when inside of a foreign call. The results can be quite catastrophic (e.g. segmentation faults while unwinding).
Unfortunately it's really not clear what can be done about this given that these adjustments aren't present in the Cmm representation that we use to produce frame information.