Re: [PATCH] ash: preserve characters on heap in backquote parsing

2018-11-19 Thread Ron Yorston
Herbert Xu has rejected the equivalent patch for dash, writing: >Sorry, but this is not the only place where dash relies on alloca. >So you're bound to run into this problem again if you have a script >that attempts to push dash to use more than 8MB in places like this. > >So I'm not going to

Re: [PATCH] ash: preserve characters on heap in backquote parsing

2018-11-16 Thread Ron Yorston
Denys Vlasenko wrote: >The location you are touching here is the same in dash. >Looks like it needs to be fixed there as well. >Can you submit this fix to dash? Then I'll port it from there, >and code will stay in sync. I submitted the same fix to the dash mailing list shortly after sending it

Re: [PATCH] ash: preserve characters on heap in backquote parsing

2018-11-16 Thread Denys Vlasenko
Hi Ron, As usual, since those years back when dash resumed (semi-)active maintenance of ash codebase, I would like to be easily pick up fixes from them. In order to do that, it would be very useful to keep codebase from diverging further than it has already diverged. For example, bbox ash had a

[PATCH] ash: preserve characters on heap in backquote parsing

2018-11-11 Thread Ron Yorston
This bug: https://bugs.busybox.net/show_bug.cgi?id=9246 demonstrates a test case where BusyBox ash segfaults due to a stack overflow. Instead of using alloca() to preserve characters keep them on the shell's heap-based stack. With this change the test case returns: $ busybox sh