diff -Nru micropython-1.14+ds/debian/changelog micropython-1.14+ds/debian/changelog --- micropython-1.14+ds/debian/changelog 2021-02-16 09:52:54.000000000 +0000 +++ micropython-1.14+ds/debian/changelog 2021-06-23 20:36:11.000000000 +0000 @@ -1,3 +1,10 @@ +micropython (1.14+ds-1ubuntu1) impish; urgency=medium + + * Change subpkg_tried to a static variable to avoid clobbering by longjmp + (LP: #1931955) + + -- William 'jawn-smith' Wilson Wed, 23 Jun 2021 20:36:11 +0000 + micropython (1.14+ds-1) unstable; urgency=medium * New upstream release diff -Nru micropython-1.14+ds/debian/control micropython-1.14+ds/debian/control --- micropython-1.14+ds/debian/control 2021-02-16 09:52:54.000000000 +0000 +++ micropython-1.14+ds/debian/control 2021-06-23 20:36:11.000000000 +0000 @@ -1,5 +1,6 @@ Source: micropython -Maintainer: Yangfl +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Yangfl Section: python Priority: optional Build-Depends: diff -Nru micropython-1.14+ds/debian/patches/0011-make-static-variable-potentially-clobbered-by-longjmp.patch micropython-1.14+ds/debian/patches/0011-make-static-variable-potentially-clobbered-by-longjmp.patch --- micropython-1.14+ds/debian/patches/0011-make-static-variable-potentially-clobbered-by-longjmp.patch 1970-01-01 00:00:00.000000000 +0000 +++ micropython-1.14+ds/debian/patches/0011-make-static-variable-potentially-clobbered-by-longjmp.patch 2021-06-23 20:36:11.000000000 +0000 @@ -0,0 +1,27 @@ +Description: Change a potentially clobbered variable to static + There was a bool that was not static and potentially clobbered. This was causing build + failures in certain architectures and is fixed by making it a static bool. +Origin: upstream, https://github.com/micropython/micropython/commit/9c9bfe1968d4260924316353bd1c941fe7e8741d +Bug: https://github.com/micropython/micropython/issues/6636 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/micropython/+bug/1931955 +Last-Update: 2021-06-23 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: micropython-1.14+ds/ports/unix/main.c +=================================================================== +--- micropython-1.14+ds.orig/ports/unix/main.c ++++ micropython-1.14+ds/ports/unix/main.c +@@ -592,7 +592,12 @@ MP_NOINLINE int main_(int argc, char **a + + mp_obj_t mod; + nlr_buf_t nlr; +- bool subpkg_tried = false; ++ ++ // Allocating subpkg_tried on the stack can lead to compiler warnings about this ++ // variable being clobbered when nlr is implemented using setjmp/longjmp. Its ++ // value must be preserved across calls to setjmp/longjmp. ++ static bool subpkg_tried; ++ subpkg_tried = false; + + reimport: + if (nlr_push(&nlr) == 0) { diff -Nru micropython-1.14+ds/debian/patches/series micropython-1.14+ds/debian/patches/series --- micropython-1.14+ds/debian/patches/series 2021-02-16 09:52:54.000000000 +0000 +++ micropython-1.14+ds/debian/patches/series 2021-06-23 20:34:42.000000000 +0000 @@ -8,3 +8,4 @@ 0008-samd-Makefile-Include-ldexp-in-build-if-needed-by-fl.patch 0009-py-parsenum-Improve-parsing-of-floats-with-large-num.patch 0010-unix-modjni-Add-missing-const.patch +0011-make-static-variable-potentially-clobbered-by-longjmp.patch