Fix segfault in 1996/august (but clang is broken)

The program segfaulted which prevented it from being used. This was due
to addressing far out of bounds of the m array. This was discovered with
a debugger. But a strange problem is that one cannot use -ggdb3 - -g
works however. This is because it hangs.

Now this entry will not work (at least a part or one of the invocations)
with clang and that means that it won't work with macOS. Is it because
of some debug symbols that are being generated or something else? I
really do not know but the judges noted back then that some compilers
compile it into an infinite loop (though the command they suggested did
not have the problem - a later one did). I updated the bugs.md with
details under the status of it does not work with some compilers.

I also added the try.sh script as a convenience as there are a lot of
commands to do.
This commit is contained in:
Cody Boone Ferguson committed 2023-04-19 06:55:10 -07:00
1 parent 4e2492f734
commit 738393c695
5 files changed
+75 -6

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
make clobber all
set -x
cat august.c test.oc | ./august > test.oo
./august < test.oo
cat august.c fac.oc | ./august > fac.oo
./august < fac.oo
cat august.c fac.oc | ./august | ./august
cat august.c parse.oc | ./august > parse.oo
cat parse.oo fac.oc | ./august | ./august
rm august.oc
make august.oc
cat august.c august.oc | ./august > august.oo
cat august.oo test.oo | ./august
cat august.oo august.oo fac.oo | ./august
cat august.oo august.oo august.oo fac.oo | ./august