Bug 9761

Summary: mbsnrtowcs() not working
Product: uClibc Reporter: Igor Liferenko <igor.liferenko>
Component: LocalesAssignee: unassigned
Status: NEW ---    
Severity: normal CC: uclibc-cvs
Priority: P5    
Version: 0.9.33.2   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:
Attachments: test program

Description Igor Liferenko 2017-03-20 01:51:44 UTC
Created attachment 6961 [details]
test program

Hi,

mbsnrtowcs() fails badly in openwrt "Designated Driver" on mips
(locale is properly supported in my setup, because other wide-character
functions work as documented).

The test program mbsnrtowcs.c is attached.

This is its output:

  [ 1235.400240] 
  do_page_fault(): sending SIGSEGV to mbsnrtowcs for invalid write access to 
  00000000
  [ 1235.407567] epc = 770f1648 in libc.so[770a4000+91000]
  [ 1235.412522] ra  = 770f161c in libc.so[770a4000+91000]
  [ 1235.417610] 
  Segmentation fault

I compiled openwrt with this config:

CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_GLINET=y
CONFIG_DEVEL=y
CONFIG_BUILD_NLS=y
CONFIG_SDK=y
CONFIG_PACKAGE_iconv=y
CONFIG_PACKAGE_libcharset=y
CONFIG_PACKAGE_libiconv-full=y
CONFIG_PACKAGE_libintl-full=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR=0
CONFIG_BUSYBOX_CONFIG_LOCALE_SUPPORT=y
CONFIG_BUSYBOX_CONFIG_SUBST_WCHAR=65533
CONFIG_BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN=y
CONFIG_BUSYBOX_CONFIG_UNICODE_SUPPORT=y
CONFIG_BUSYBOX_CONFIG_UNICODE_USING_LOCALE=y
CONFIG_PACKAGE_kmod-nls-utf8=y