[Toybox] Toybox bc run away interactive process

2018-08-27 Thread Sasha Toltec
When attempting to use ctrl-c to kill the toybox bc implementation while in non-interactive mode a bug results in it entering interactive mode while the program continues to run and then the user loses control of both interactive and non-interactive modes. To reproduce: echo "s(131231)" | ./bc -l

[Toybox] [PENDING] [fold.c] [Question]

2018-08-27 Thread haroon maqsood
Hi Rob, I started working on fold.c cleanup, going through the code, and testing it out, i have a couple of questions. 1. gnu fold engulfs \n unconditionally i.e if there is a \n after the fold has happend that redundant \n does not make it to the output , that kind of makes sense but the

Re: [Toybox] Toybox bc's transcendental and irrational functions produce incorrect results, memory leaks and exhibit brute force algorithmic complexity.

2018-08-27 Thread Gavin Howard
Hi Sasha, Thank you for bringing to my attention these potentially serious issues. I will certainly investigate each of them and make the appropriate changes. I've included an associate who is familiar with the origins and development of this `bc' to help me address each point below, as you make

Re: [Toybox] [PATCH] sendevent: remove ioctl call

2018-08-27 Thread Nick Kralevich
It just occurred to me that there could be another intention behind the ioctl call. Calling ioctl(EVIOCGVERSION) on the /dev/input device is a way for the code to verify it's actually sending messages to a /dev/input file, vs some other file. So, while not documented in the source code, this call

Re: [Toybox] [PENDING] [fold.c] [Question]

2018-08-27 Thread Samuel Holland
Hi, On 08/27/18 03:09, haroon maqsood wrote: > Hi Rob, > I started working on fold.c cleanup, > going through the code, and testing it out, i have a couple of questions. > > 1. gnu fold engulfs \n unconditionally i.e if there is a \n after the fold > has > happened that redundant \n does

[Toybox] [PATCH] sendevent: remove ioctl call

2018-08-27 Thread Nick Kralevich
The version number queried by this ioctl call is never used. Delete it. -- Nick From 3addf78f5670c24ed8f8f9717947bb24870ea0b5 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Mon, 27 Aug 2018 11:18:38 -0700 Subject: [PATCH] sendevent: remove ioctl call The version number queried by this

Re: [Toybox] Toybox bc's transcendental and irrational functions produce incorrect results, memory leaks and exhibit brute force algorithmic complexity.

2018-08-27 Thread Sasha Toltec
We ran across these errors while doing "make check" on the hebimath bignum library on an alpine linux system running against toybox's `bc'. Hebimath uses POSIX bc as part of its test suite, Perhaps it could be used to drive the core arithmetic of your POSIX bc implementation as it is MIT licensed

Re: [Toybox] Toybox bc's transcendental and irrational functions produce incorrect results, memory leaks and exhibit brute force algorithmic complexity.

2018-08-27 Thread Sasha Toltec
Wait.. what? Am I really reading an email signed by two people? First off, you used subtractive chunking for division. Calling this a naive algorithm is giving it more credit than it is worth. The only time subtractive chunking is used is by school children. I cloned your repository (van Rijn