commit | aeb0b6185c4d34a071f5410991e1f9fc8eed24e7 | [log] [tgz] |
---|---|---|
author | Gavin Howard <yzena.tech@gmail.com> | Fri Sep 21 12:21:16 2018 -0600 |
committer | Gavin Howard <yzena.tech@gmail.com> | Fri Sep 21 12:21:16 2018 -0600 |
tree | 3fa7bf593a7b03548d23801368fc1118f0610b2d | |
parent | aa5374f5755b607c6ca41791703c766857367696 [diff] |
Add a test found by afl This test is a bit different. It actually found a ***HUGE*** bug that was obvious in retrospect. The bug was that when doing binary operators with two variables or two array elements, if the second var/array hadn't existed before the operation, the var or array vectors might be expanded, which includes a realloc(). Since the first var/element was already found, its num pointer would became invalid. Of course, this caused segfaults, invalid reads, double frees, the whole shebang (thank you, Valgrind). This commit only adds the test that afl used to find it, which even requires changes to errors.sh. Next commit will have the fix.
bc
This is an implementation of POSIX bc
that implements GNU bc
extensions, as well as the period (.
) extension for the BSD bc.
This bc
is Free and Open Source Software (FOSS). It is licensed under the BSD 0-clause License.
To build, use the following commands:
make make install
This bc
supports CC
, CFLAGS
, CPPFLAGS
, LDFLAGS
, LDLIBS
, PREFIX
, and DESTDIR
make
variables. Users can also create a file named config.mak
in the root directory to control make
.
There is also a make help
command to list all targets and options.
This bc
is in beta stage. It has been well-tested and fuzzed, but has not yet been proven in the wild.
This bc
is written in pure ISO C99.
This bc
uses the commit message guidelines laid out in this blog post.
This bc
uses semantic versioning.
Files:
install.sh Install script from musl libc. LICENSE.md A Markdown form of the BSD 0-clause License. Makefile The Makefile. NOTICE.md List of contributors and copyright owners. RELEASE.md A checklist for making a release. TODO.md A TODO list.
Folders:
include All header files. lib The bc math library and code to generate C source for it. src All source code. tests All tests. toybox Files to cut a release into toybox. (Maintainer use only.)