diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/gcc-setmultilib-fix.diff | 22 | ||||
-rw-r--r-- | debian/rules.patch | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 4cd639e..c04982c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ gcc-4.8 (4.8.3-4) UNRELEASED; urgency=medium [ Matthias Klose ] * Fix removal of python byte-code files in libstdc++6. Addresses: #751435. + * Fix a segfault in the driver from calling free on non-malloc'd area. -- Matthias Klose <doko@debian.org> Mon, 16 Jun 2014 09:28:11 +0200 diff --git a/debian/patches/gcc-setmultilib-fix.diff b/debian/patches/gcc-setmultilib-fix.diff new file mode 100644 index 0000000..950057b --- /dev/null +++ b/debian/patches/gcc-setmultilib-fix.diff @@ -0,0 +1,22 @@ +--- a/src/gcc/gcc.c ++++ b/src/gcc/gcc.c +@@ -8038,10 +8038,15 @@ + q2++; + if (*q2 == ':') + ml_end = q2; +- new_multilib_os_dir = XNEWVEC (char, ml_end - q); +- memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1); +- new_multilib_os_dir[ml_end - q - 1] = '\0'; +- multilib_os_dir = *new_multilib_os_dir ? new_multilib_os_dir : "."; ++ if (ml_end - q == 1) ++ multilib_os_dir = xstrdup ("."); ++ else ++ { ++ new_multilib_os_dir = XNEWVEC (char, ml_end - q); ++ memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1); ++ new_multilib_os_dir[ml_end - q - 1] = '\0'; ++ multilib_os_dir = new_multilib_os_dir; ++ } + + if (q2 < end && *q2 == ':') + { diff --git a/debian/rules.patch b/debian/rules.patch index b0dce31..ed490d9 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -98,6 +98,7 @@ debian_patches += \ libitm-aarch64 \ pr61046 \ pr61336 \ + gcc-setmultilib-fix \ # FIXME: still necessary for cross building the native compiler? # gcc-auto-build \ |