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
On Fedora 34 the following fixes are needed to build nuweb. Compiling with CFLAGS='-g -O2 -Wall' reports some unused variables, I deleted most of them. Attached git patches against frob (8267eaf), renamed to .txt to appease github.
A troubling warning I can't fix offhand is:
scraps.c: In function ‘search’:
scraps.c:1316:28: warning: array subscript 1025 is above array bounds of ‘char[1024]’ [-Warray-bounds]
1316 | c = m->prev->chars[SLAB_SIZE - k];
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
scraps.c:6:8: note: while referencing ‘chars’
6 | char chars[SLAB_SIZE];
| ^~~~~
This comes from the piece (at line 6082):
@d Get the nth previous character from a scrap
@{int k = m->index - n - 2;
if (k >= 0)
c = m->scrap->chars[k];
else if (m->prev)
c = m->prev->chars[SLAB_SIZE - k];
@}
It is seen that k should be 0 here, and the chars member is defined of size SLAB_SIZE, so this gives an out of bounds access.
There are some further warnings that I'll dig into later. Perhaps also try latest clang and crank up warnings...
On Fedora 34 the following fixes are needed to build
nuweb
. Compiling withCFLAGS='-g -O2 -Wall'
reports some unused variables, I deleted most of them. Attached git patches againstfrob
(8267eaf), renamed to.txt
to appease github.A troubling warning I can't fix offhand is:
This comes from the piece (at line 6082):
It is seen that
k
should be 0 here, and thechars
member is defined of sizeSLAB_SIZE
, so this gives an out of bounds access.There are some further warnings that I'll dig into later. Perhaps also try latest clang and crank up warnings...
0001-Fix-link-errors-warnings.patch.txt
0002-Propagate-fixes-to-generated-files.patch.txt
0003-Add-nuweb-nuweb-to-.gitignore.patch.txt
The text was updated successfully, but these errors were encountered: