<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glibc.git, branch aaribaud/tmp</title>
<subtitle>sourceware.org: git/glibc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/'/>
<entry>
<title>Y2038: make __tz_convert compatible with 64-bit-time</title>
<updated>2018-06-15T18:05:16+00:00</updated>
<author>
<name>Albert ARIBAUD (3ADEV)</name>
<email>albert.aribaud@3adev.fr</email>
</author>
<published>2018-04-11T19:32:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=66f277a3a40f369ca8e583d410f5f7771da5aa61'/>
<id>66f277a3a40f369ca8e583d410f5f7771da5aa61</id>
<content type='text'>
This implies that its callers be 64-bit-time compatible too.
It is done by creating 64-bit-time versions of these and
turning their original 32-bit-time versions into wrappers
(at a slight execution time cost).

The callers affected are:

  * localtime
  * localtime_r
  * ctime
  * ctime_r
  * gmtime
  * gmtime_r

Note that in time/tzfile.c we do not need to check for time_t
overflows anymore as introduced by commit fc79706a323 since we
now use internal_time_t.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implies that its callers be 64-bit-time compatible too.
It is done by creating 64-bit-time versions of these and
turning their original 32-bit-time versions into wrappers
(at a slight execution time cost).

The callers affected are:

  * localtime
  * localtime_r
  * ctime
  * ctime_r
  * gmtime
  * gmtime_r

Note that in time/tzfile.c we do not need to check for time_t
overflows anymore as introduced by commit fc79706a323 since we
now use internal_time_t.
</pre>
</div>
</content>
</entry>
<entry>
<title>Y2038: Add 64-bit time for all architectures</title>
<updated>2018-06-15T15:41:13+00:00</updated>
<author>
<name>Albert ARIBAUD (3ADEV)</name>
<email>albert.aribaud@3adev.fr</email>
</author>
<published>2018-06-13T16:36:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=38a873073548a9a52136067df65cf47103e3342b'/>
<id>38a873073548a9a52136067df65cf47103e3342b</id>
<content type='text'>
* Add macro __TIMESIZE equal to the bit size of time_t.
  It equals the architecture __WORDSIZE except for x32
  where it equals 64.

* Add type __time64_t which is always 64-bit. On 64-bit
  architectures and on x32, it is #defined as time_t.
  On other architectures, it has its own type.

* Replace all occurrences of internal_time_t with
  __time64_t.

The  __time64_t type is public so that the public time_t type
can be a typedef or #define of __time64_t when we switch the
public API to 64-bit time.

Also, provide a function (inline) to check if a __time64_t
value fits in a (possibly 32-bit) time_t. This is used when
a 32-bit-time wrapper calls a glibc function which returns
a __time64_t, so that the wrapper can detect times which
it cannot properly return to its caller, and can flag an
EOVERFLOW accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add macro __TIMESIZE equal to the bit size of time_t.
  It equals the architecture __WORDSIZE except for x32
  where it equals 64.

* Add type __time64_t which is always 64-bit. On 64-bit
  architectures and on x32, it is #defined as time_t.
  On other architectures, it has its own type.

* Replace all occurrences of internal_time_t with
  __time64_t.

The  __time64_t type is public so that the public time_t type
can be a typedef or #define of __time64_t when we switch the
public API to 64-bit time.

Also, provide a function (inline) to check if a __time64_t
value fits in a (possibly 32-bit) time_t. This is used when
a 32-bit-time wrapper calls a glibc function which returns
a __time64_t, so that the wrapper can detect times which
it cannot properly return to its caller, and can flag an
EOVERFLOW accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/update-abilist.sh: Accept empty list of files to patch</title>
<updated>2018-06-14T07:37:31+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2018-06-14T07:37:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c59ee916a66299f23d81568c77d7af3be17d4b6c'/>
<id>c59ee916a66299f23d81568c77d7af3be17d4b6c</id>
<content type='text'>
Commit b289cd9db8286fa6c670104dd5dfcfc68d5d00d6 (“Ignore absolute
symbols in ABI tests.”) broke “make update-all-abi” because an empty
list of files is now passed to scripts/update-abilist.sh.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit b289cd9db8286fa6c670104dd5dfcfc68d5d00d6 (“Ignore absolute
symbols in ABI tests.”) broke “make update-all-abi” because an empty
list of files is now passed to scripts/update-abilist.sh.
</pre>
</div>
</content>
</entry>
<entry>
<title>hurd: Avoid a PLT reference</title>
<updated>2018-06-13T23:43:23+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2018-06-13T23:43:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=06d1a8263d72dfb3e638cb98c92bee3405262f44'/>
<id>06d1a8263d72dfb3e638cb98c92bee3405262f44</id>
<content type='text'>
	* sysdeps/mach/hurd/i386/____longjmp_chk.S (____longjmp_chk): Do not
	use PLT to call _hurd_self_sigstate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* sysdeps/mach/hurd/i386/____longjmp_chk.S (____longjmp_chk): Do not
	use PLT to call _hurd_self_sigstate.
</pre>
</div>
</content>
</entry>
<entry>
<title>hurd: Avoid PLTs for __mach_thread_self and __mach_reply_port</title>
<updated>2018-06-13T23:01:57+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2018-06-13T23:01:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=126b3ec370f0fa8ecbbce27c8c4b621b1ce6f02d'/>
<id>126b3ec370f0fa8ecbbce27c8c4b621b1ce6f02d</id>
<content type='text'>
	* mach/mach/mach_traps.h (__mach_reply_port, __mach_thread_self,
	__mach_task_self, __mach_host_self, __swtch, __swtch_pri,
	__thread_switch, __evc_wait): Move declarations to...
	* sysdeps/mach/include/mach/mach_traps.h: ... new file, and add
	attribute_hidden.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* mach/mach/mach_traps.h (__mach_reply_port, __mach_thread_self,
	__mach_task_self, __mach_host_self, __swtch, __swtch_pri,
	__thread_switch, __evc_wait): Move declarations to...
	* sysdeps/mach/include/mach/mach_traps.h: ... new file, and add
	attribute_hidden.
</pre>
</div>
</content>
</entry>
<entry>
<title>hurd: Avoid PLTs for _hurd_port_locked_get/set</title>
<updated>2018-06-13T22:28:03+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2018-06-13T22:28:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c8c6e6d6d0859e5e9b3c6f8b3daa4e6b6e709873'/>
<id>c8c6e6d6d0859e5e9b3c6f8b3daa4e6b6e709873</id>
<content type='text'>
	* sysdeps/hurd/include/hurd/port.h: New file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* sysdeps/hurd/include/hurd/port.h: New file.
</pre>
</div>
</content>
</entry>
<entry>
<title>hurd: update localplt.data</title>
<updated>2018-06-13T22:22:20+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2018-06-13T22:22:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c8c910ed9cbff8c75e74149f227adf3c960f1dbc'/>
<id>c8c910ed9cbff8c75e74149f227adf3c960f1dbc</id>
<content type='text'>
after 329ea513b451 ("Avoid cancellable I/O primitives in ld.so.")

	* sysdeps/mach/hurd/localplt.data (ld.so): Add __open64, rename
	__libc_read and __libc_write to __read and __write.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
after 329ea513b451 ("Avoid cancellable I/O primitives in ld.so.")

	* sysdeps/mach/hurd/localplt.data (ld.so): Add __open64, rename
	__libc_read and __libc_write to __read and __write.
</pre>
</div>
</content>
</entry>
<entry>
<title>hurd: xfail missing abilist for libmachuser and libhurduser</title>
<updated>2018-06-13T19:12:23+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2018-06-13T19:12:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=43b5ff50b5002b035ee9cd9d1c1f908b7cd4c370'/>
<id>43b5ff50b5002b035ee9cd9d1c1f908b7cd4c370</id>
<content type='text'>
They need more work to implement, see bug 23286.

	* sysdeps/mach/hurd/i386/Makefile (test-xfail-check-abi-libhurduser,
	test-xfail-check-abi-libmachuser): Add.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They need more work to implement, see bug 23286.

	* sysdeps/mach/hurd/i386/Makefile (test-xfail-check-abi-libhurduser,
	test-xfail-check-abi-libmachuser): Add.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix strtod overflow detection (bug 23279).</title>
<updated>2018-06-13T16:06:14+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2018-06-13T16:06:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=fcd6b5ac36a49e83e27e9186ded04329d3b0b0d9'/>
<id>fcd6b5ac36a49e83e27e9186ded04329d3b0b0d9</id>
<content type='text'>
As shown by bug 23279, strtod's round_and_return has an off-by-one
error in its overflow detection, only counting an exponent greater
than MAX_EXP as overflowing when an exponent of MAX_EXP also means
overflow (recall the ISO C definition of DBL_MAX_EXP etc. is based on
a floating-point model where 2^exp is multiplied by a value in the
interval [0.5, 1), so 2^MAX_EXP is not representable).

For decimal arguments to strtod, a separate overflow check in the main
implementation covers the case where the integer part of the argument
(truncated to the nearest integer towards zero) has more than MAX_EXP
bits, meaning that this issue in round_and_return only affects cases
(arguments with absolute value strictly between the maximum
representable value and 2^MAX_EXP) where overflow depends on the
rounding mode; in such cases, the returned value would still have been
correct on overflow but without the overflow exception being raised or
errno being set to ERANGE.  For hex float arguments, however, other
cases can arise, as shown in bug 23279, where a value with exponent
already set to MAX_EXP is passed into round_and_return and a result
can wrongly end up being NaN, or infinity instead of the largest
finite value.

This patch fixes the off-by-one error, adds testing of overflow
exceptions to the tst-strtod-round framework, and adds tests of these
issues.

Tested for x86_64.  Also ran the tst-strtod-round tests for powerpc to
make sure the new tests didn't introduce any new failures for IBM long
double.

	[BZ #23279]
	* stdlib/strtod_l.c (round_and_return): Handle an exponent of
	MAX_EXP as overflowing.
	* stdlib/gen-tst-strtod-round.c (string_to_fp): Clear MPFR
	overflow flag.
	(round_str): Output also whether result overflows in each rounding
	mode.
	* stdlib/tst-strtod-round-data: Add more tests.
	* stdlib/tst-strtod-round-data.h: Regenerated.
	* stdlib/tst-strtod-round-skeleton.c (_XNTRY): Update comment.
	(TEST): Handle extra arguments for overflow flags.
	(struct test_overflow): New type.
	[!FE_OVERFLOW] (FE_OVERFLOW): Define to 0.
	(GEN_ONE_TEST): Clear all exceptions.  Test overflow flag.
	(test_in_one_mode): Take argument with overflow information.
	(do_test): Update calls to test_in_one_mode.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As shown by bug 23279, strtod's round_and_return has an off-by-one
error in its overflow detection, only counting an exponent greater
than MAX_EXP as overflowing when an exponent of MAX_EXP also means
overflow (recall the ISO C definition of DBL_MAX_EXP etc. is based on
a floating-point model where 2^exp is multiplied by a value in the
interval [0.5, 1), so 2^MAX_EXP is not representable).

For decimal arguments to strtod, a separate overflow check in the main
implementation covers the case where the integer part of the argument
(truncated to the nearest integer towards zero) has more than MAX_EXP
bits, meaning that this issue in round_and_return only affects cases
(arguments with absolute value strictly between the maximum
representable value and 2^MAX_EXP) where overflow depends on the
rounding mode; in such cases, the returned value would still have been
correct on overflow but without the overflow exception being raised or
errno being set to ERANGE.  For hex float arguments, however, other
cases can arise, as shown in bug 23279, where a value with exponent
already set to MAX_EXP is passed into round_and_return and a result
can wrongly end up being NaN, or infinity instead of the largest
finite value.

This patch fixes the off-by-one error, adds testing of overflow
exceptions to the tst-strtod-round framework, and adds tests of these
issues.

Tested for x86_64.  Also ran the tst-strtod-round tests for powerpc to
make sure the new tests didn't introduce any new failures for IBM long
double.

	[BZ #23279]
	* stdlib/strtod_l.c (round_and_return): Handle an exponent of
	MAX_EXP as overflowing.
	* stdlib/gen-tst-strtod-round.c (string_to_fp): Clear MPFR
	overflow flag.
	(round_str): Output also whether result overflows in each rounding
	mode.
	* stdlib/tst-strtod-round-data: Add more tests.
	* stdlib/tst-strtod-round-data.h: Regenerated.
	* stdlib/tst-strtod-round-skeleton.c (_XNTRY): Update comment.
	(TEST): Handle extra arguments for overflow flags.
	(struct test_overflow): New type.
	[!FE_OVERFLOW] (FE_OVERFLOW): Define to 0.
	(GEN_ONE_TEST): Clear all exceptions.  Test overflow flag.
	(test_in_one_mode): Take argument with overflow information.
	(do_test): Update calls to test_in_one_mode.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix comments in _dl_dst_count and _dl_dst_substitute.</title>
<updated>2018-06-13T03:35:06+00:00</updated>
<author>
<name>Carlos O'Donell</name>
<email>carlos@redhat.com</email>
</author>
<published>2018-06-13T03:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=a745c837cb51c2efe8900740548cb68ec2a2f7ab'/>
<id>a745c837cb51c2efe8900740548cb68ec2a2f7ab</id>
<content type='text'>
The comments in _dl_dst_count is adjusted to match what the code does
which is count DSTs from the start of the string. With the removal of
DL_DST_COUNT we no longer accept an input that starts at the first $.

In _dl_dst_substitute we adjust the comment to indicate that both
conditions must be true for the SUID/SGID $ORIGIN exception.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The comments in _dl_dst_count is adjusted to match what the code does
which is count DSTs from the start of the string. With the removal of
DL_DST_COUNT we no longer accept an input that starts at the first $.

In _dl_dst_substitute we adjust the comment to indicate that both
conditions must be true for the SUID/SGID $ORIGIN exception.
</pre>
</div>
</content>
</entry>
</feed>
