You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the eleventh of the thickfold patch series, which enables
ksh93 to operate within a 64-bit address space.
The parts of ksh93 affected by this commit are:
- Various pieces of code wrongly assuming char is signed have been
fixed (follow-up to #962).
- The nval system, string.c, array handling and waitevent.c. This
is probably one of the most consequential changes, the effect
being that ksh is now capable of storing variables larger than
UINT_MAX.
Conspicuous changes of note:
- With the expansion of np->nvsize to a size_t (which can be either
64-bit or 32-bit), the void* padding variable was a necessary
addition for alignment purposes, so as to silence UBSan errors
and prevent untimely memory faults.
- (This part by Martijn Dekker) The NV_MINSZ and nv_namptr macros
in nval.h have been corrected to properly align the value data
that follows a static Namval_t header (minus its nvlink member)
in a portable manner, i.e., according to max_align_t's
alignment requirement (re: 01abbc6). This fixes longstanding
incorrect alignment logic that happened to work on most
platforms but broke if the layout of the Namval struct
(Namval_t) was changed, causing undefined behaviour mainly in
nvtype.c. This change should finally make it safe to apply
future edits to Namval_t (except that nvlink and nvname must
remain unchanged).
- An -Wunreachable-code-return warning at the end of nv_create()
has been fixed.
- nv_setsize() as exposed in the public nval API now requires an
argument of exactly (size_t)-1 to function like the nv_size()
macro.
- nv_create(): ported over an old fix from my expand-nvflags branch
to allow usage of strlen without downcasting the result to an
int. This fix adds a uint64_t nvflags variable for storing flags,
which introduces some inconsequential warnings. Fixing/avoiding
those is out of the scope of this project; that's better suited
for a future revision of expand-nvflags.
- Removed the unused and inessential attsize and attval struct
members (these are remnants of the A__z botch, re: f215b10).
Change in the number of warnings on Linux when compiling with clang
using -Wsign-compare -Wshorten-64-to-32 -Wsign-conversion
-Wimplicit-int-conversion: 802 => 481 => 37 (progression from part
10 => part 11 => part 13)
Progresses #592
Co-authored-by: Martijn Dekker <martijn@inlv.org>
0 commit comments