Hi,
The function towlower doesn't work with locales diffrent from C.
Issue was introduced in this commit:
https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/commit/?id=
8cde3a9bf2856dcb9a759dec7ecb04a68e712254
Call to setlocale is needed for correct generation of the table uplow_diff.
I received the compile time error "range assumption error" after
uncommenting the call.
Similar problem described here:
http://lists.uclibc.org/pipermail/uclibc/2015-March/048852.html
The attached patch fix the problem by using int32_t values.
Test program:
$ cat test.c
#include <locale.h>
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
int main(int argc, char *argv[])
{
int i = 0;
wchar_t str[] = L"ТЕСТОВАЯ СТРОКА";
wchar_t c;
setlocale(LC_ALL, "ru_RU.utf-8");
wprintf(L"Input:\t\"%ls\"\n", str);
wprintf(L"Output:\t\"");
while (str[i]) {
c = str[i];
putwchar(towlower(c));
i++;
}
wprintf(L"\"\n");
return 0;
}
Output (without patch):
$ ./test
Input: "ТЕСТОВАЯ СТРОКА"
Output: "ТЕСТОВАЯ СТРОКА"
Output (with patch):
$ ./test
Input: "ТЕСТОВАЯ СТРОКА"
Output: "тестовая строка"
--
Best regards,
Eugene
Hi,
Current uClibc-ng have issue with several different valloc declarations.
malloc.h:
#ifdef __UCLIBC_SUSV2_LEGACY__
/* Allocate SIZE bytes on a page boundary. */
extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size))
__attribute_malloc__;
#endif
stdlib.h:
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Allocate SIZE bytes on a page boundary. The storage cannot be freed.
*/
extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
#endif
The second declaration doesn't use the define __UCLIBC_SUSV2_LEGACY__.
That leads to compile time problems.
The attached patch fixes this diffrence.
--
Best regards,
Eugene
Hi,
I would like to get some feedback for following three patches.
The test suite runs over all architectures showed no regressions.
The goal is to simplify the addition of new architectures and
remove the need to add assembly code to sysdep-cancel.h.
Most of the work was done in 2011 in commit
9f68f0cbf8c8eea6a7f9e195e4617bbaa808d7c6, but it was not finished
for NPTL and RT components of uClibc.
best regards
Waldemar
Hi,
investigating a segfault
(gdb) bt full
#0 0x00007fffec28dd90 in __deregister_frame_info () from /lib/
libgcc_s.so.1
No symbol table info available.
#1 0x00007fffebf8af66 in __do_global_dtors_aux () from /usr/lib/
libgcrypt.so.20
when starting Apache with mod_php activated on a buildroot-built x86_64-
system with uclibc-1.0.19 I came across discussions from 2012 & 2014 on
the uClibc mailinglist:
2012:
http://lists.uclibc.org/pipermail/uclibc/2012-October/047059.html
2014:
http://lists.busybox.net/pipermail/uclibc/2014-December/048737.html
Building mod_php without libgcrypt.so, which means disabling
BR2_PACKAGE_PHP_EXT_XSL, does not fix the problem, the segfault will
occur in another shared lib.
Quoting the message from 2014:
> In my particular case, this meant dlopening and dlclosing some 47
> shared objects as reported by "LD_DEBUG=1 /usr/bin/gdk-pixbuf-query-
> loaders ./libpixbufloader-svg.la 2>&1 | grep ^do_dlopen | grep ctors
> | wc -l"
My system opens even more shared libs when starting Apache & mod_php:
# LD_DEBUG=1 /usr/bin/httpd -t 2>&1 | grep ^do_dlopen | grep ctors | wc -l
64
Segmentation fault
Please note that using Apache without mod_php works fine, php-cgi itself
also works fine.
In 2014 Anthony suggested to revert
https://git.busybox.net/uClibc/commit/ldso?
h=0.9.33&id=9b42da7d0558884e2a3cc9a8674ccfc752369610
which still solves the Apache/mod_php segfault today.
Uclibc-1.0.19 includes all commits from 2016-09-26 and older in
https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/log/ldso/libdl
it therefore includes https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/
commit/ldso/libdl?id=cc04ab27ba6341f46bbe094478c9af3e3706f411 which
refers to fix the problem from the 2012 message, but it did not.
Regards, Bernd