Hello community,

here is the log from the commit of package coreutils for openSUSE:Factory 
checked in at 2015-10-06 13:23:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/coreutils (Old)
 and      /work/SRC/openSUSE:Factory/.coreutils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "coreutils"

Changes:
--------
--- /work/SRC/openSUSE:Factory/coreutils/coreutils-testsuite.changes    
2015-09-08 17:35:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.coreutils.new/coreutils-testsuite.changes       
2015-10-06 13:23:09.000000000 +0200
@@ -1,0 +2,12 @@
+Sun Sep 20 15:22:45 UTC 2015 - [email protected]
+
+- coreutils-i18n.patch: Sync I18N patch from semi-official repository
+  (shared among distributions, maintained by Padraig Brady):
+    https://github.com/pixelb/coreutils/tree/i18n
+  This fixes the following issues in multi-byte locales:
+  * sort: fix large mem leak with --month-sort (boo#945361, rh#1259942):
+    https://github.com/pixelb/coreutils/commit/b429f5d8c7
+  * sort: fix assertion with some inputs to --month-sort
+    https://github.com/pixelb/coreutils/commit/31e8211aca
+
+-------------------------------------------------------------------
coreutils.changes: same change

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
coreutils.spec: same change

++++++ coreutils-i18n.patch ++++++
--- /var/tmp/diff_new_pack.QrkptB/_old  2015-10-06 13:23:11.000000000 +0200
+++ /var/tmp/diff_new_pack.QrkptB/_new  2015-10-06 13:23:11.000000000 +0200
@@ -7,8 +7,9 @@
  src/sort.c                  |  763 
+++++++++++++++++++++++++++++++++++++++++---
  src/unexpand.c              |  228 +++++++++++++
  src/uniq.c                  |  265 ++++++++++++++-
+ tests/i18n/sort-month.sh    |   34 +
  tests/i18n/sort.sh          |   29 +
- tests/local.mk              |    2 
+ tests/local.mk              |    3 
  tests/misc/cut.pl           |    7 
  tests/misc/expand.pl        |   40 ++
  tests/misc/fold.pl          |   50 ++
@@ -19,7 +20,7 @@
  tests/misc/unexpand.pl      |   39 ++
  tests/misc/uniq.pl          |   55 +++
  tests/pr/pr-tests.pl        |   49 ++
- 21 files changed, 3255 insertions(+), 180 deletions(-)
+ 22 files changed, 3290 insertions(+), 180 deletions(-)
 
 Index: lib/linebuffer.h
 ===================================================================
@@ -3076,8 +3077,8 @@
 +  register int lo = 0, hi = MONTHS_PER_YEAR, result;
 +  char *tmp;
 +  size_t wclength, mblength;
-+  const char **pp;
-+  const wchar_t **wpp;
++  const char *pp;
++  const wchar_t *wpp;
 +  wchar_t *month_wcs;
 +  mbstate_t state;
 +
@@ -3090,17 +3091,19 @@
 +  if (len == 0)
 +    return 0;
 +
-+  month = (char *) xmalloc (len + 1);
++  if (SIZE_MAX - len < 1)
++    xalloc_die ();
 +
-+  tmp = (char *) xmalloc (len + 1);
++  month = (char *) xnmalloc (len + 1, MB_CUR_MAX);
++
++  pp = tmp = (char *) xnmalloc (len + 1, MB_CUR_MAX);
 +  memcpy (tmp, s, len);
 +  tmp[len] = '\0';
-+  pp = (const char **)&tmp;
-+  month_wcs = (wchar_t *) xmalloc ((len + 1) * sizeof (wchar_t));
-+  memset (&state, '\0', sizeof(mbstate_t));
++  wpp = month_wcs = (wchar_t *) xnmalloc (len + 1, sizeof (wchar_t));
++  memset (&state, '\0', sizeof (mbstate_t));
 +
-+  wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);
-+  if (wclength == (size_t)-1 || *pp != NULL)
++  wclength = mbsrtowcs (month_wcs, &pp, len + 1, &state);
++  if (wclength == (size_t)-1 || pp != NULL)
 +    error (SORT_FAILURE, 0, _("Invalid multibyte input %s."), quote(s));
 +
 +  for (i = 0; i < wclength; i++)
@@ -3113,10 +3116,8 @@
 +        }
 +    }
 +
-+  wpp = (const wchar_t **)&month_wcs;
-+
-+  mblength = wcsrtombs (month, wpp, len + 1, &state);
-+  assert (mblength != (-1) && *wpp == NULL);
++  mblength = wcsrtombs (month, &wpp, (len + 1) * MB_CUR_MAX, &state);
++  assert (mblength != (-1) && wpp == NULL);
 +
 +  do
 +    {
@@ -4167,12 +4168,13 @@
 ===================================================================
 --- tests/local.mk.orig
 +++ tests/local.mk
-@@ -341,6 +341,8 @@ all_tests =                                        \
+@@ -341,6 +341,9 @@ all_tests =                                        \
    tests/misc/sort-discrim.sh                  \
    tests/misc/sort-files0-from.pl              \
    tests/misc/sort-float.sh                    \
 +  tests/misc/sort-mb-tests.sh                 \
 +  tests/i18n/sort.sh                          \
++  tests/i18n/sort-month.sh                    \
    tests/misc/sort-merge.pl                    \
    tests/misc/sort-merge-fdlimit.sh            \
    tests/misc/sort-month.sh                    \
@@ -4783,3 +4785,42 @@
  my $save_temps = $ENV{DEBUG};
  my $verbose = $ENV{VERBOSE};
  
+Index: tests/i18n/sort-month.sh
+===================================================================
+--- /dev/null
++++ tests/i18n/sort-month.sh
+@@ -0,0 +1,34 @@
++#!/bin/sh
++# Verify sort -M multi-byte support.
++
++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
++print_ver_ sort
++require_valgrind_
++
++# Skip this test if some deallocations are
++# avoided at process end.
++grep '^#define lint 1' $CONFIG_HEADER > /dev/null ||
++  skip_ 'Allocation checks only work reliably in "lint" mode'
++
++export LC_ALL=en_US.UTF-8
++locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \
++  || skip_ "No UTF-8 locale available"
++
++# Note the use of ɑ here which expands to
++# a wider representation upon case conversion
++# which triggered an assertion in sort -M
++cat <<EOF > exp
++.
++ɑ
++EOF
++
++
++# check large mem leak with --month-sort
++# https://bugzilla.redhat.com/show_bug.cgi?id=1259942
++valgrind --leak-check=full \
++         --error-exitcode=1 --errors-for-leak-kinds=definite \
++         sort -M < exp > out || fail=1
++compare exp out || { fail=1; cat out; }
++
++
++Exit $fail

++++++ coreutils-tests-shorten-extreme-factor-tests.patch ++++++
--- /var/tmp/diff_new_pack.QrkptB/_old  2015-10-06 13:23:11.000000000 +0200
+++ /var/tmp/diff_new_pack.QrkptB/_new  2015-10-06 13:23:11.000000000 +0200
@@ -14,9 +14,9 @@
 
 Index: tests/local.mk
 ===================================================================
---- tests/local.mk.orig        2015-07-09 15:10:56.769806990 +0200
-+++ tests/local.mk     2015-07-09 15:10:56.839805334 +0200
-@@ -678,14 +678,9 @@ all_tests =                                       \
+--- tests/local.mk.orig
++++ tests/local.mk
+@@ -679,14 +679,9 @@ all_tests =                                       \
  # See tests/factor/create-test.sh.
  tf = tests/factor
  factor_tests = \



Reply via email to