sprintf optimizations have issues with %{ %} - segfault

2014-06-01 Thread Chris Angelico
Example code: int main() { array x=({ ({128,0,TiMidity,TiMidity port 0}), ({128,1,TiMidity,TiMidity port 1}), }); write(Ports available:\n%{%3d:%-3d %-32.32s %s\n%},x); } In the latest Pikes, this may segfault or produce horribly wrong data; a --with-debug build

Re: sprintf optimizations have issues with %{ %} - segfault

2014-06-01 Thread Arne Goedeke
Thanks for the report. The translation was somewhat mechanical, but I somehow messed that up. Fixed in 8.0. arne On Sun, 1 Jun 2014, Chris Angelico wrote: Example code: int main() { array x=({ ({128,0,TiMidity,TiMidity port 0}), ({128,1,TiMidity,TiMidity port 1}), });

Re: sprintf optimizations have issues with %{ %} - segfault

2014-06-01 Thread Chris Angelico
On Sun, Jun 1, 2014 at 9:42 PM, Arne Goedeke e...@laramies.com wrote: Thanks for the report. The translation was somewhat mechanical, but I somehow messed that up. Fixed in 8.0. That does cure the problem, but now it's not possible for the fs-fsp incorrect trap to happen at all. Was there an

Re: sprintf optimizations have issues with %{ %} - segfault

2014-06-01 Thread Arne Goedeke
That debug check is a left over from before 061713bf4d5ca4673144690f164a48856c289b57, when the format stack had a static size. Its purpose was to detect bugs in the format stack handling. It should be removed now. arne On Sun, 1 Jun 2014, Chris Angelico wrote: On Sun, Jun 1, 2014 at 9:42 PM,