Re: [PATCH] ash: fix a crash on arm when building with clang.

2017-12-28 Thread Yunlian Jiang
Sorry about the confusion. My build system changed the compiler back to gcc when I try to apply the patch and the patch does not help. However, the patch below helps @@ -173,7 +173,11 @@ struct lineedit_statics { }; /* See lineedit_ptr_hack.c */ -extern struct lineedit_statics *const

Re: [PATCH] ash: fix a crash on arm when building with clang.

2017-12-20 Thread Kang-Che Sung
On Thu, Dec 21, 2017 at 5:32 AM, Yunlian Jiang wrote: > > When I run > busybox ash on an arm device with busybox built with clang 6. > I got a segmentation fault > in the macro > #define INIT_S() do { \ > (*(struct lineedit_statics**)_ptr_to_statics) = xzalloc(sizeof(S)); \ >

[PATCH] ash: fix a crash on arm when building with clang.

2017-12-20 Thread Yunlian Jiang
When I run busybox ash on an arm device with busybox built with clang 6. I got a segmentation fault in the macro #define INIT_S() do { \ (*(struct lineedit_statics**)_ptr_to_statics) = xzalloc(sizeof(S)); \ barrier(); \ cmdedit_termw = 80; \ IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;)