prep for 2.16.0.0 release with value address arithmetic restrictions

This commit is contained in:
Landon Curt Noll
2025-08-14 18:23:07 -07:00
parent db83b7383f
commit 753b101e54
8 changed files with 201 additions and 51 deletions

36
CHANGES
View File

@@ -1,3 +1,37 @@
The following are the changes from calc version 2.15.1.2 to 2.16.0.0:
Starting with calc version 2.16.0.0, the ability to perform arithmetic
on addresses of values in calc objects has been greatly restricted.
Most arithmetic on of value addresses could easily cause calc to
crash. For example, prior to calc version 2.16.0.0, the following
command was likely to crash calc:
calc '*((&.)+1e9)'
Subtracting two value addresses is permitted, however there is NO
guarantee that the address of a value will remain consistent across
calc runs. Addresses of values depend on the circumstances of when
the calc values were formed.
The above restrictions and caveats apply to addresses of values.
Such restrictions and caveats to NOT apply to the addresses of
octets, NOR to the addresses within strings. If isptr(x) == 2, then
x is value-pointer and the above mentioned restrictions and caveats apply.
See "help address" for more information on value address arithmetic.
Added E_INVALID_DEREF (10610) error code to indicate the invalid
dereferencing a non-variable.
Added E_INVALID_ADDR_OP (10611) error code to indicate an invalid
arithmetic address operation.
We plan to let this most recent change settle down before performing
the calc v2 to calc v3 fork. Therefore, version 2.16.1.0 will form
the basis for the calc v2 to calc v3 fork.
The following are the changes from calc version 2.15.1.2 to 2.15.1.2:
Removed use of HAVE_MEMMOVE as well have_memmv.c. Removed the
@@ -17,8 +51,6 @@ The following are the changes from calc version 2.15.1.1 to 2.15.1.1:
Put full date range (1989-2025) of calc source into version.h.
Version 2.16.0.0 will form the basis for the calc v2 to calc v3 fork.
The following are the changes from calc version 2.15.0.7 to 2.15.1.0: