1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-10-24 01:33:52 +03:00
Files
glibc/include
Stefan Liebler 80eb52e3a9 Remove attribute_hidden for wchar ifunc symbols.
On s390 (31bit) various debug/tst-*chk* testcases are failing as the tests
are ending with a segmentation fault.

One test is e.g. calling wcsnrtombs in debug/tst-chk1.c:1549.
The function wcsnrtombs itself calls __wcsnlen. This function is called via
PLT! The PLT-stub itself loads the address from GOT (r12 is assumed to be
the GOT-pointer). In this case the loaded address is zero and the following
branch leads to the segmentation fault.

Due to the attribute_hidden in commit 44af8a32c3
"Mark internal wchar functions with attribute_hidden [BZ #18822]"
for e.g. the __wcsnlen function, r12 is not loaded with the GOT-pointer
in wcsnrtombs.

On s390x (64bit), this __wcsnlen call is also using the PLT-stub. But it is
not failing as the GOT-pointer is setup with larl-instruction by the PLT-stub
itself.
Note: On s390x/s390, __wcsnlen is an IFUNC symbol.

On x86_64, __wcsnlen is also an IFUNC symbol and is called via PLT, too.

Further IFUNC symbols on s390 which were marked as hidden by the mentioned
commit are: __wcscat, __wcsncpy, __wcpncpy, __wcschrnul.

This patch removes the attribute_hidden in wchar.h.
Then the compiler setups e.g. r12 on s390 in order to call __wcsnlen via PLT.

ChangeLog:

	* include/wchar.h (__wcsnlen, __wcscat, __wcsncpy, __wcpncpy,
	__wcschrnul): Remove attribute_hidden.
2017-11-21 08:43:23 +01:00
..
2017-08-16 20:33:59 +00:00
2016-10-28 22:40:16 -04:00
…
…
…
2015-09-15 20:36:50 +00:00
…
…
2017-04-07 07:45:53 -04:00
…
…
2017-11-13 08:02:52 -08:00
2017-10-30 20:58:51 +00:00
…
…
2017-11-09 05:10:03 -08:00
…
…
…
…
…
…
…
…