diff -Nru fpc-3.0.4+dfsg/debian/changelog fpc-3.0.4+dfsg/debian/changelog --- fpc-3.0.4+dfsg/debian/changelog 2018-04-22 14:10:23.000000000 +0000 +++ fpc-3.0.4+dfsg/debian/changelog 2018-07-02 10:37:17.000000000 +0000 @@ -1,3 +1,10 @@ +fpc (3.0.4+dfsg-18ubuntu1) bionic; urgency=medium + + * debian/patches/fpc-r38400.patch: + - fix crash when hedgewars closes (LP: #1779648). + + -- Gianfranco Costamagna Mon, 02 Jul 2018 12:37:17 +0200 + fpc (3.0.4+dfsg-18) unstable; urgency=medium * Remove dpkg-architecture calls to reduce build time and lintian warnings diff -Nru fpc-3.0.4+dfsg/debian/patches/fpc-r38400.patch fpc-3.0.4+dfsg/debian/patches/fpc-r38400.patch --- fpc-3.0.4+dfsg/debian/patches/fpc-r38400.patch 1970-01-01 00:00:00.000000000 +0000 +++ fpc-3.0.4+dfsg/debian/patches/fpc-r38400.patch 2018-07-02 10:37:17.000000000 +0000 @@ -0,0 +1,21 @@ +Origin: https://src.fedoraproject.org/rpms/fpc/pull-request/1 +--- a/fpcsrc/rtl/linux/x86_64/si_c.inc ++++ b/fpcsrc/rtl/linux/x86_64/si_c.inc +@@ -158,6 +158,7 @@ procedure _FPC_libc_haltproc; assembler; + movq ExitCode@GOTPCREL(%rip),%rax + movzwq (%rax),%rax { load and save exitcode } + ++ popq %rdx { keep stack aligned } + movq fpc_ret(%rip),%rdx { return to libc } + movq fpc_ret_rbp(%rip),%rbp + pushq %rdx +--- a/fpcsrc/rtl/linux/x86_64/cprt0.as ++++ b/fpcsrc/rtl/linux/x86_64/cprt0.as +@@ -111,6 +111,7 @@ _haltproc: + movq ___fpc_ret_rbp@GOTPCREL(%rip),%rcx + movq (%rcx),%rbp + movq ___fpc_ret@GOTPCREL(%rip),%rcx ++ popq %rdx + movq (%rcx),%rdx + pushq %rdx + ret diff -Nru fpc-3.0.4+dfsg/debian/patches/series fpc-3.0.4+dfsg/debian/patches/series --- fpc-3.0.4+dfsg/debian/patches/series 2018-04-15 14:59:01.000000000 +0000 +++ fpc-3.0.4+dfsg/debian/patches/series 2018-07-02 10:37:17.000000000 +0000 @@ -31,3 +31,4 @@ fix_make_files_generation.patch fix-IDE-GDB-support.patch clean_man_pages.patch +fpc-r38400.patch