2015-10-12 14:31:32 +02:00
|
|
|
Fix iconv buffer handling with IGNORE error handler (bug #18830)
|
|
|
|
|
|
|
|
[BZ #18830]
|
|
|
|
* iconv/skeleton.c (FUNCTION_NAME): Use RESET_INPUT_BUFFER only if
|
|
|
|
no irreversible characters occurred.
|
|
|
|
* iconv/gconv_simple.c (internal_ucs4_loop)
|
|
|
|
(internal_ucs4_loop_unaligned, internal_ucs4_loop_single)
|
|
|
|
(ucs4_internal_loop, ucs4_internal_loop_unaligned)
|
|
|
|
(ucs4_internal_loop_single, internal_ucs4le_loop)
|
|
|
|
(internal_ucs4le_loop_unaligned, internal_ucs4le_loop_single)
|
|
|
|
(ucs4le_internal_loop, ucs4le_internal_loop_unaligned)
|
|
|
|
(ucs4le_internal_loop_single): Add const to outend.
|
2016-08-08 14:56:22 +02:00
|
|
|
* iconv/Makefile (tests): Add tst-iconv7.
|
|
|
|
* iconv/tst-iconv7.c: New file.
|
2015-10-12 14:31:32 +02:00
|
|
|
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
Index: glibc-2.27/iconv/Makefile
|
2015-10-12 14:31:32 +02:00
|
|
|
===================================================================
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
--- glibc-2.27.orig/iconv/Makefile
|
|
|
|
+++ glibc-2.27/iconv/Makefile
|
Accepting request 670585 from home:Andreas_Schwab:Factory
- Update to glibc 2.29
* The getcpu wrapper function has been added, which returns the currently
used CPU and NUMA node
* Optimized generic exp, exp2, log, log2, pow, sinf, cosf, sincosf and tanf
* The reallocarray function is now declared under _DEFAULT_SOURCE, not just
for _GNU_SOURCE, to match BSD environments
* For powercp64le ABI, Transactional Lock Elision is now enabled iff kernel
indicates that it will abort the transaction prior to entering the kernel
(PPC_FEATURE2_HTM_NOSC on hwcap2)
* The functions posix_spawn_file_actions_addchdir_np and
posix_spawn_file_actions_addfchdir_np have been added, enabling
posix_spawn and posix_spawnp to run the new process in a different
directory
* The popen and system do not run atfork handlers anymore (BZ#17490)
* strftime's default formatting of a locale's alternative year (%Ey)
has been changed to zero-pad the year to a minimum of two digits,
like "%y"
* As a GNU extension, the '_' and '-' flags can now be applied to
"%EY" to control how the year number is formatted
* The glibc.tune tunable namespace has been renamed to glibc.cpu and the
tunable glibc.tune.cpu has been renamed to glibc.cpu.name
* The type of the pr_uid and pr_gid members of struct elf_prpsinfo, defined
in <sys/procfs.h>, has been corrected to match the type actually used by
the Linux kernel
* An archaic GNU extension to scanf, under which '%as', '%aS', and '%a[...]'
meant to scan a string and allocate space for it with malloc, is now
restricted to programs compiled in C89 or C++98 mode with _GNU_SOURCE
defined
- unwind-ctor.patch, old-getdents64.patch, nss-files-leak.patch,
riscv-feholdexcept-setround.patch,
OBS-URL: https://build.opensuse.org/request/show/670585
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=516
2019-02-01 14:45:56 +01:00
|
|
|
@@ -44,7 +44,7 @@ CFLAGS-charmap.c += -DCHARMAP_PATH='"$(i
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
CFLAGS-simple-hash.c += -I../locale
|
2015-10-12 14:31:32 +02:00
|
|
|
|
Accepting request 670585 from home:Andreas_Schwab:Factory
- Update to glibc 2.29
* The getcpu wrapper function has been added, which returns the currently
used CPU and NUMA node
* Optimized generic exp, exp2, log, log2, pow, sinf, cosf, sincosf and tanf
* The reallocarray function is now declared under _DEFAULT_SOURCE, not just
for _GNU_SOURCE, to match BSD environments
* For powercp64le ABI, Transactional Lock Elision is now enabled iff kernel
indicates that it will abort the transaction prior to entering the kernel
(PPC_FEATURE2_HTM_NOSC on hwcap2)
* The functions posix_spawn_file_actions_addchdir_np and
posix_spawn_file_actions_addfchdir_np have been added, enabling
posix_spawn and posix_spawnp to run the new process in a different
directory
* The popen and system do not run atfork handlers anymore (BZ#17490)
* strftime's default formatting of a locale's alternative year (%Ey)
has been changed to zero-pad the year to a minimum of two digits,
like "%y"
* As a GNU extension, the '_' and '-' flags can now be applied to
"%EY" to control how the year number is formatted
* The glibc.tune tunable namespace has been renamed to glibc.cpu and the
tunable glibc.tune.cpu has been renamed to glibc.cpu.name
* The type of the pr_uid and pr_gid members of struct elf_prpsinfo, defined
in <sys/procfs.h>, has been corrected to match the type actually used by
the Linux kernel
* An archaic GNU extension to scanf, under which '%as', '%aS', and '%a[...]'
meant to scan a string and allocate space for it with malloc, is now
restricted to programs compiled in C89 or C++98 mode with _GNU_SOURCE
defined
- unwind-ctor.patch, old-getdents64.patch, nss-files-leak.patch,
riscv-feholdexcept-setround.patch,
OBS-URL: https://build.opensuse.org/request/show/670585
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=516
2019-02-01 14:45:56 +01:00
|
|
|
tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 tst-iconv6 \
|
|
|
|
- tst-iconv-mt
|
|
|
|
+ tst-iconv7 tst-iconv-mt
|
2015-10-12 14:31:32 +02:00
|
|
|
|
|
|
|
others = iconv_prog iconvconfig
|
|
|
|
install-others-programs = $(inst_bindir)/iconv
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
Index: glibc-2.27/iconv/gconv_simple.c
|
2015-10-12 14:31:32 +02:00
|
|
|
===================================================================
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
--- glibc-2.27.orig/iconv/gconv_simple.c
|
|
|
|
+++ glibc-2.27/iconv/gconv_simple.c
|
2015-10-12 14:31:32 +02:00
|
|
|
@@ -76,7 +76,7 @@ __attribute ((always_inline))
|
|
|
|
internal_ucs4_loop (struct __gconv_step *step,
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp, const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp, const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
const unsigned char *inptr = *inptrp;
|
|
|
|
@@ -120,7 +120,8 @@ internal_ucs4_loop_unaligned (struct __g
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
const unsigned char *inptr = *inptrp;
|
|
|
|
@@ -169,7 +170,8 @@ internal_ucs4_loop_single (struct __gcon
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
mbstate_t *state = step_data->__statep;
|
|
|
|
@@ -231,7 +233,7 @@ __attribute ((always_inline))
|
|
|
|
ucs4_internal_loop (struct __gconv_step *step,
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp, const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp, const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
int flags = step_data->__flags;
|
|
|
|
@@ -298,7 +300,8 @@ ucs4_internal_loop_unaligned (struct __g
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
int flags = step_data->__flags;
|
|
|
|
@@ -368,7 +371,8 @@ ucs4_internal_loop_single (struct __gcon
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
mbstate_t *state = step_data->__statep;
|
|
|
|
@@ -443,7 +447,7 @@ __attribute ((always_inline))
|
|
|
|
internal_ucs4le_loop (struct __gconv_step *step,
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp, const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp, const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
const unsigned char *inptr = *inptrp;
|
|
|
|
@@ -488,7 +492,8 @@ internal_ucs4le_loop_unaligned (struct _
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
const unsigned char *inptr = *inptrp;
|
|
|
|
@@ -540,7 +545,8 @@ internal_ucs4le_loop_single (struct __gc
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
mbstate_t *state = step_data->__statep;
|
|
|
|
@@ -601,7 +607,7 @@ __attribute ((always_inline))
|
|
|
|
ucs4le_internal_loop (struct __gconv_step *step,
|
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp, const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp, const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
int flags = step_data->__flags;
|
2016-08-08 14:56:22 +02:00
|
|
|
@@ -671,7 +677,8 @@ ucs4le_internal_loop_unaligned (struct _
|
2015-10-12 14:31:32 +02:00
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
int flags = step_data->__flags;
|
2016-08-08 14:56:22 +02:00
|
|
|
@@ -745,7 +752,8 @@ ucs4le_internal_loop_single (struct __gc
|
2015-10-12 14:31:32 +02:00
|
|
|
struct __gconv_step_data *step_data,
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
- unsigned char **outptrp, unsigned char *outend,
|
|
|
|
+ unsigned char **outptrp,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
mbstate_t *state = step_data->__statep;
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
Index: glibc-2.27/iconv/skeleton.c
|
2015-10-12 14:31:32 +02:00
|
|
|
===================================================================
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
--- glibc-2.27.orig/iconv/skeleton.c
|
|
|
|
+++ glibc-2.27/iconv/skeleton.c
|
2015-10-12 14:31:32 +02:00
|
|
|
@@ -597,6 +597,10 @@ FUNCTION_NAME (struct __gconv_step *step
|
|
|
|
inptr = *inptrp;
|
|
|
|
/* The outbuf buffer is empty. */
|
|
|
|
outstart = outbuf;
|
|
|
|
+#ifdef RESET_INPUT_BUFFER
|
|
|
|
+ size_t loop_irreversible
|
|
|
|
+ = lirreversible + (irreversible ? *irreversible : 0);
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#ifdef SAVE_RESET_STATE
|
|
|
|
SAVE_RESET_STATE (1);
|
|
|
|
@@ -671,8 +675,16 @@ FUNCTION_NAME (struct __gconv_step *step
|
|
|
|
if (__glibc_unlikely (outerr != outbuf))
|
|
|
|
{
|
|
|
|
#ifdef RESET_INPUT_BUFFER
|
|
|
|
- RESET_INPUT_BUFFER;
|
|
|
|
-#else
|
|
|
|
+ if (loop_irreversible
|
|
|
|
+ == lirreversible + (irreversible ? *irreversible : 0))
|
|
|
|
+ {
|
|
|
|
+ /* RESET_INPUT_BUFFER can only work if there
|
|
|
|
+ were no irreversible characters during the
|
|
|
|
+ last loop. */
|
|
|
|
+ RESET_INPUT_BUFFER;
|
|
|
|
+ goto done_reset;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
/* We have a problem in one of the functions below.
|
|
|
|
Undo the conversion upto the error point. */
|
2016-02-24 12:39:39 +01:00
|
|
|
size_t nstatus __attribute__ ((unused));
|
2015-10-12 14:31:32 +02:00
|
|
|
@@ -682,9 +694,9 @@ FUNCTION_NAME (struct __gconv_step *step
|
|
|
|
outbuf = outstart;
|
|
|
|
|
|
|
|
/* Restore the state. */
|
|
|
|
-# ifdef SAVE_RESET_STATE
|
|
|
|
+#ifdef SAVE_RESET_STATE
|
|
|
|
SAVE_RESET_STATE (0);
|
|
|
|
-# endif
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
if (__glibc_likely (!unaligned))
|
|
|
|
{
|
|
|
|
@@ -701,7 +713,7 @@ FUNCTION_NAME (struct __gconv_step *step
|
|
|
|
lirreversiblep
|
|
|
|
EXTRA_LOOP_ARGS);
|
|
|
|
}
|
|
|
|
-# if POSSIBLY_UNALIGNED
|
|
|
|
+#if POSSIBLY_UNALIGNED
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (FROM_DIRECTION)
|
|
|
|
@@ -720,7 +732,7 @@ FUNCTION_NAME (struct __gconv_step *step
|
|
|
|
lirreversiblep
|
|
|
|
EXTRA_LOOP_ARGS);
|
|
|
|
}
|
|
|
|
-# endif
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/* We must run out of output buffer space in this
|
|
|
|
rerun. */
|
|
|
|
@@ -731,9 +743,11 @@ FUNCTION_NAME (struct __gconv_step *step
|
|
|
|
the invocation counter. */
|
|
|
|
if (__glibc_unlikely (outbuf == outstart))
|
|
|
|
--data->__invocation_counter;
|
|
|
|
-#endif /* reset input buffer */
|
|
|
|
}
|
|
|
|
|
|
|
|
+#ifdef RESET_INPUT_BUFFER
|
|
|
|
+ done_reset:
|
|
|
|
+#endif
|
|
|
|
/* Change the status. */
|
|
|
|
status = result;
|
|
|
|
}
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
Index: glibc-2.27/iconv/tst-iconv7.c
|
2015-10-12 14:31:32 +02:00
|
|
|
===================================================================
|
|
|
|
--- /dev/null
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
+++ glibc-2.27/iconv/tst-iconv7.c
|
2015-10-12 14:31:32 +02:00
|
|
|
@@ -0,0 +1,68 @@
|
|
|
|
+/* Test iconv buffer handling with the IGNORE error handler.
|
|
|
|
+ Copyright (C) 2015 Free Software Foundation, Inc.
|
|
|
|
+ This file is part of the GNU C Library.
|
|
|
|
+
|
|
|
|
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
+ modify it under the terms of the GNU Lesser General Public
|
|
|
|
+ License as published by the Free Software Foundation; either
|
|
|
|
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
|
+
|
|
|
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
+ Lesser General Public License for more details.
|
|
|
|
+
|
|
|
|
+ You should have received a copy of the GNU Lesser General Public
|
|
|
|
+ License along with the GNU C Library; if not, see
|
|
|
|
+ <http://www.gnu.org/licenses/>. */
|
|
|
|
+
|
|
|
|
+/* Derived from BZ #18830 */
|
|
|
|
+#include <errno.h>
|
|
|
|
+#include <iconv.h>
|
|
|
|
+#include <stdio.h>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+static int
|
|
|
|
+do_test (void)
|
|
|
|
+{
|
|
|
|
+ iconv_t cd = iconv_open ("ASCII//IGNORE", "ASCII");
|
|
|
|
+ if (cd == (iconv_t) -1)
|
|
|
|
+ {
|
|
|
|
+ puts ("iconv_open failed");
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ char input[5 + 3] = { 0, 0, 0, 0, 0, '1', '\200', '2' };
|
|
|
|
+ char *inptr = input;
|
|
|
|
+ size_t insize = sizeof (input);
|
|
|
|
+ char output[5];
|
|
|
|
+ char *outptr = output;
|
|
|
|
+ size_t outsize = sizeof (output);
|
|
|
|
+
|
|
|
|
+ size_t ret = iconv (cd, &inptr, &insize, &outptr, &outsize);
|
|
|
|
+ if (ret != (size_t) -1)
|
|
|
|
+ {
|
|
|
|
+ puts ("iconv succeeded");
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+ if (errno != E2BIG)
|
|
|
|
+ {
|
|
|
|
+ puts ("iconv did not set errno to E2BIG");
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+ if (inptr != input + sizeof (output) - outsize)
|
|
|
|
+ {
|
|
|
|
+ printf ("iconv consumed %td characters\n", inptr - input);
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (iconv_close (cd) == -1)
|
|
|
|
+ {
|
|
|
|
+ puts ("iconv_close failed");
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#define TEST_FUNCTION do_test ()
|
|
|
|
+#include "../test-skeleton.c"
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
Index: glibc-2.27/sysdeps/s390/multiarch/gconv_simple.c
|
2016-08-08 14:56:22 +02:00
|
|
|
===================================================================
|
Accepting request 572614 from home:Andreas_Schwab:Factory
- Update to glibc 2.27
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin, cosf,
sinf, sincosf and tan with FMA
* Optimized x86-64 trunc and truncf for processors with SSE4.1
* Optimized generic expf, exp2f, logf, log2f, powf, sinf, cosf and
sincosf
* In order to support faster and safer process termination the malloc API
family of functions will no longer print a failure address and stack
backtrace after detecting heap corruption
* The abort function terminates the process immediately, without flushing
stdio streams
* On platforms where long double has the IEEE binary128 format (aarch64,
alpha, mips64, riscv, s390 and sparc), the math library now implements
_Float128 interfaces for that type, as defined by ISO/IEC TS 18661-3:2015
These are the same interfaces added in version 2.26 for some platforms where
this format is supported but is not the format of long double
* On platforms with support for _Float64x (aarch64, alpha, i386, ia64,
mips64, powerpc64le, riscv, s390, sparc and x86_64), the math library now
implements interfaces for that type, as defined by ISO/IEC TS
18661-3:2015
* The math library now implements interfaces for the _Float32, _Float64 and
_Float32x types, as defined by ISO/IEC TS 18661-3:2015
* glibc now implements the memfd_create and mlock2 functions on Linux
* Support for memory protection keys was added
* The copy_file_range function was added
* The ldconfig utility now processes `include' directives using the C/POSIX
collation ordering
* Support for two grammatical forms of month names has been added
* Support for the RISC-V ISA running on Linux has been added
* Statically compiled applications attempting to load locales compiled for the
OBS-URL: https://build.opensuse.org/request/show/572614
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=491
2018-02-05 11:33:11 +01:00
|
|
|
--- glibc-2.27.orig/sysdeps/s390/multiarch/gconv_simple.c
|
|
|
|
+++ glibc-2.27/sysdeps/s390/multiarch/gconv_simple.c
|
2016-08-08 14:56:22 +02:00
|
|
|
@@ -403,7 +403,7 @@ ICONV_VX_NAME (internal_ucs4le_loop) (st
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
unsigned char **outptrp,
|
|
|
|
- unsigned char *outend,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
const unsigned char *inptr = *inptrp;
|
|
|
|
@@ -503,7 +503,7 @@ ICONV_VX_NAME (ucs4_internal_loop) (stru
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
unsigned char **outptrp,
|
|
|
|
- unsigned char *outend,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
int flags = step_data->__flags;
|
|
|
|
@@ -630,7 +630,7 @@ ICONV_VX_NAME (ucs4le_internal_loop) (st
|
|
|
|
const unsigned char **inptrp,
|
|
|
|
const unsigned char *inend,
|
|
|
|
unsigned char **outptrp,
|
|
|
|
- unsigned char *outend,
|
|
|
|
+ const unsigned char *outend,
|
|
|
|
size_t *irreversible)
|
|
|
|
{
|
|
|
|
int flags = step_data->__flags;
|