Skip to content

Commit 10e38c5

Browse files
committed
Release v2.16.0.3
The following are the changes in this release: The segmentation fault as reported in issue #174 has been fixed. When the `powervalue()` function was expanded to (in `value.c`), to process complex powers, the author forgot that the function `c_power()` returns NULL when the result is too large to represent in memory. Now, when `c_power()` returns NULL within the `powervalue()` function, the `E_POWER_4` math error ("Too-large value for power") will be raised. Thanks go to the GitHub user @mengrj for reporting this problem in issue #174 in a clear and concise way such that we were able to fix this problem. Reduced `MAXCMD` (maximum length of command invocation) in `calv.h` from 16384 to 5120. On most systems, commands longer than 5.6k would hit the soft stack size limit and trigger a stack overflow condition causing calc to crash with a SIGSEGV (segmentation violation). If you need a super-long calc commands, consider increasing the `MAXCMD` value in `calc.h`, and increase the stack size limits for your calc run. For example under Linux to increase the maximum stack size to 2^28 bytes: prlimit --stack=268435456 calc or: ulimit -s 49152 calc Resolved, as much we can, issue #175. Recommend `-fstack-protector-all` in `Makefile.local` comments. Fixed signed integer overflow in `c_power()`. The `c_power(COMPLEX *c1, COMPLEX *c2, NUMBER *epsilon)` function in `comfunc.c` no longer triggers a signed integer overflow. Added `qqbitvalue(NUMBER pos)` to `qmarth.c`: like `qbitvalue(long n)` but with a NUMBER arg, and will return NULL if the shifted bit is too large to hold in memory. Added `zzbitvalue(ZVALUE pos, ZVALUE *res)`: similar to the `zbitvalue(long n, ZVALUE *res)` function but with a `ZVALUE` arg, and returns a boolean, and does not call math_error(). Added `ZVALUE _baseb_` to hold the `BASEB` as a `ZVALUE`. Added `MAXDATA_LOG2` to hold the log base 2 value of `MAXDATA`. Added `MAXLEN_LOG2` to hold the log base 2 value of `MAXLEN`. Added `HALF_BITS` as an alias for `BASEB`. Added to `cal/regress.cal`, regression test 9758 to test for the condition that issue #174 was about. Improved the Common Address Sanitizer (ASAN) comments in `Makefile.config` and `Makefile.local`. Resolved issue #176.
1 parent 424f5e9 commit 10e38c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ EXT=
12451245

12461246
# The calc version in the form of x.y.z.w
12471247
#
1248-
VERSION= 2.16.0.2
1248+
VERSION= 2.16.0.3
12491249

12501250
# The calc major version in the form of x.y.z
12511251
#

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#define MAJOR_VER 2 /* level 1: major library version */
6565
#define MINOR_VER 16 /* level 2: minor library version */
6666
#define MAJOR_PATCH 0 /* level 3: major software version level */
67-
#define MINOR_PATCH 2 /* level 4: minor software version level */
67+
#define MINOR_PATCH 3 /* level 4: minor software version level */
6868

6969
/*
7070
* Defining PERMIT_DANGEROUS_ADDRESS_ARITHMETIC is NOT supported!

0 commit comments

Comments
 (0)