From 63e722ce5fc4ade0567b6456c30320f2edc4afae Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 31 May 2024 12:12:38 -0700 Subject: [PATCH] Restore bug status in 1984/laman The bugs.{md,html} files, 1984/laman/README.md (and index.html) file and thanks files were updated. The thanks file has some additional fixes that were already in place but are relevant to this commit. --- 1984/laman/README.md | 12 +++ 1984/laman/index.html | 4 + 1984/laman/laman.c | 4 +- bugs.html | 193 ++++++++++++++++++++++-------------------- bugs.md | 21 +++-- thanks-for-help.html | 65 +++++++++----- thanks-for-help.md | 77 ++++++++++++----- 7 files changed, 231 insertions(+), 145 deletions(-) diff --git a/1984/laman/README.md b/1984/laman/README.md index 67783ddf1..40d5e55d5 100644 --- a/1984/laman/README.md +++ b/1984/laman/README.md @@ -5,6 +5,18 @@ ``` +### Bugs and (Mis)features: + +The current status of this entry is: + +``` + STATUS: INABIAF - please **DO NOT** fix +``` + +For more detailed information see [1984/laman in bugs.html](../../bugs.html#1984_laman). + + + ## To use: ``` diff --git a/1984/laman/index.html b/1984/laman/index.html index 463351fc3..620199915 100644 --- a/1984/laman/index.html +++ b/1984/laman/index.html @@ -403,6 +403,10 @@ Location: ZZ - Unknown location
make all
+The current status of this entry is:
+ STATUS: INABIAF - please **DO NOT** fix
+For more detailed information see 1984/laman in bugs.html.
./laman <positive number>
1984/mullender (see below and the FAQ -for a version that works in modern systems) is very system specific and was -before system specific winning entries were discouraged. This is an all time -personal favourite of Landon Curt Noll. Run the alternate code to understand why -this might be (along with how strange the source code is :-) ).
+1984/mullender (see below for a +version that works in modern systems) is very system specific and was before +system specific winning entries were discouraged. This is an all time personal +favourite of Landon Curt Noll. Run the alternate code to understand why this +might be (along with how strange the source code is :-) ).
An example where a crash is not a bug: 2019/endoh is supposed to crash. There are others that are also supposed to crash or that are known to segfault but are considered features.
@@ -702,10 +702,17 @@ you should see something like: '",x); /* \without a newline after the \. This is not a bug.
This program will very likely crash or do something funny without an arg.
Although there is an alt version and supplementary program added by Cody that @@ -732,7 +739,7 @@ emulator to test it) but running the code on the binary itself produces a
This entry is known to segfault after printing its output. It was documented by @@ -751,7 +758,7 @@ the judges and shouldn’t be fixed.
In linux it might happen that despite no error message or message about doing @@ -776,7 +783,7 @@ errors.
This program will very likely crash or break into tiny bits :-) if you feed it @@ -876,7 +883,7 @@ Enjoy! :-)
A point worth considering is that as the number passed into the program gets @@ -976,7 +983,7 @@ defeat the purpose. This would ideally be fixed.
The authors provided a list of features in the @@ -984,7 +991,7 @@ defeat the purpose. This would ideally be fixed.
Cody Boone Ferguson fixed many bugs that @@ -1000,7 +1007,7 @@ where this occurred was fixed but this one should not be fixed. Thank you.
If the maze file cannot be opened, either because the path specified does not @@ -1010,7 +1017,7 @@ file does not exist in the directory, this program will very likely crash.
There is a very simple way to always win. The program doesn’t catch you and as @@ -1027,7 +1034,7 @@ when you’re cheating it ends up winning! Can you figure that out as well?
The author stated that if the file cannot be opened then it will print a system @@ -1188,7 +1195,7 @@ than that. For instance this is what it looks like with clang:
When your own checkmate is imminent it prints "Har har" but does not exit so
@@ -1197,7 +1204,7 @@ it yourself through ctrl-c or killing it in some other fashion.
Cody improved the usability of this program by making it so that as long as the @@ -1223,7 +1230,7 @@ not a misunderstanding).
The author stated that:
@@ -1246,7 +1253,7 @@ system), this entry just shows a blank screen.This entry relied on a bug in gcc that was fixed with gcc version 2.3.3. This @@ -1256,7 +1263,7 @@ the index.html file for details.
Although the code checks if the file can be opened or not, badly formatted files @@ -1266,7 +1273,7 @@ through ctrl-c or such.
If the file cannot be opened it will very likely segfault. This should not be @@ -1292,7 +1299,7 @@ question you might cause an error. For instance don’t do this:
Of course if you do something like:
What is 'foo'?
it will work fine.
-No spaces are allowed in the expression.
@@ -1308,7 +1315,7 @@ notd-46.
When you initiate shooting via the s command you immediately lose an arrow
@@ -1318,7 +1325,7 @@ pit room you will end up dying even though you didn’t explicitly move there.
Cody Boone Ferguson fixed this to compile @@ -1421,7 +1428,7 @@ compiled!
This program will likely crash if the source code file (by the name of the file @@ -1468,7 +1475,7 @@ doesn’t break something else.
This did not originally compile under macOS and after it did compile under @@ -1500,7 +1507,7 @@ it would be good if it was fixed.
This program expects a POSITIVE number. If you specify a negative number it will @@ -1565,7 +1572,7 @@ almost be done except that some of the output of the
If X is not running this program will very likely crash or do something funny. @@ -1608,7 +1615,7 @@ to the page as well! You’ll have IOCCC fame for reviving a pootifier! :-)
A point worth considering is that as the number passed into the program gets @@ -1765,7 +1772,7 @@ on the stack at that point:
5which might (?) suggest that the + operator is unimplemented. Unfortunately it
has been many years since I have used perl and I was never a guru either.
The author states that in perl < 5.6.0 there is a bug with a core dump in what
they said is in Perl_sv_upgrade. As this is documented it is not considered a
bug to be fixed. For the curious this will crash in macOS. Cody notes that the
@@ -1807,7 +1814,7 @@ of 92 warnings! Nonetheless neither works okay and both crash.
This program does not do what you might think it does! Running it like:
@@ -1825,7 +1832,7 @@ make a pull request.If DISPLAY is not set the program will very likely crash, do something strange
@@ -1839,7 +1846,7 @@ fire! :-) ).
Cody Boone Ferguson fixed this so that it @@ -1858,7 +1865,7 @@ elves of Imladris :-(
This program will crash without an arg.
This program deliberately crashes if it loses (which is what it aims to do).
@@ -1935,7 +1942,7 @@ appreciate your help!Sometimes when one player presses q it will result in broken pipe on the other
@@ -1953,7 +1960,7 @@ set. In other words both have to be ASCII or EBCDIC - not one of each.
This program will very likely crash or do something unexpected if you do not @@ -1969,7 +1976,7 @@ wanted to install it as a tool but this is missing.
The glob pattern must match the whole string. See the author’s comments for @@ -2137,13 +2144,13 @@ compile under clang. The following patch was applied:
gavin_files: boot.b lilo.conf prim gavin_install.txtThe current (Makefile was modified to try and fit into the current IOCCC build environment.
-See known features in the index.html for things that are not bugs but documented (mis)features.
The author stated that:
@@ -2168,7 +2175,7 @@ things that are not bugs but documented (mis)features.The generated code will very likely segfault or do something not intended if not @@ -2181,7 +2188,7 @@ given the right args. See the index.html file for the correct syntax.
This program sometimes will create unsolvable puzzles :-) just to hook you.
@@ -2195,7 +2202,7 @@ dimensions. Try 100 100 100 for instance and see what happens!
This entry will very likely segfault or do something strange if the source code @@ -2204,7 +2211,7 @@ does not exist.
The author states:
@@ -2238,7 +2245,7 @@ for running itself.Cody Boone Ferguson notes that, though @@ -2252,7 +2259,7 @@ website itself.
The author stated the below points of interest.
@@ -2293,7 +2300,7 @@ with at leastcomputer.tofu input file:
The string specified must be <= 42 characters and may only consist of the @@ -2302,7 +2309,7 @@ with possibly corrupt GIF files.
This program will likely crash or do something funny without an arg.
@@ -2321,12 +2328,12 @@ but you are welcome to try and fix it. provide it as an additional alt version. Fixing this is very likely to be very challenging and in some systems it will not be possible to fix but you are welcome to try and fix it if you wish to! -Incorrect formulas will ungracefully crash the program.
This program will likely crash or do something funny if the file cannot be @@ -2334,7 +2341,7 @@ opened. The number of args is however checked.
The author stated:
@@ -2351,7 +2358,7 @@ opened. The number of args is however checked.Cody Boone Ferguson fixed this program to @@ -2398,7 +2405,7 @@ case-sensitive.
For a great amount of data points the program will crash, depending on your @@ -2421,7 +2428,7 @@ bins at the edges.
instead being something else entirely. The Internet Wayback Machine, although it archived it, did not load scripts. Do you know if the domain was moved? Do you have an archive or mirror? Please provide us it! Thank you. -The author states the following:
Bad input (e.g. nonexistent files, non-numeric number of iterations, etc.) @@ -2434,7 +2441,7 @@ tends to result in empty output.
The author stated that there are a number of features and limitations. As the @@ -2606,7 +2613,7 @@ defined.
The author stated that the program will crash if no argument is passed to the @@ -2620,7 +2627,7 @@ fire :-)
The author stated:
@@ -2629,7 +2636,7 @@ fire :-)The author stated:
@@ -2662,7 +2669,7 @@ fire :-)The author stated:
@@ -2676,7 +2683,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)The author stated:
@@ -2697,7 +2704,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)The author stated that the program will crash if no argument is passed to the @@ -2713,7 +2720,7 @@ fire :-)
The author stated:
@@ -2733,7 +2740,7 @@ and endianness conversion would make the source too large for IOCCC rule 2).This program will possibly crash or draw something strange with 0 args. Then @@ -2752,7 +2759,7 @@ used.
From the author:
@@ -2768,7 +2775,7 @@ section.From the author:
@@ -2781,14 +2788,14 @@ such asC2E2.
Invalid input files will very likely crash the program.
This program will not terminate on its own; you must kill hou (but not Qiming
@@ -2796,7 +2803,7 @@ Hou :-) ) yourself. This should not be fixed.
The author reminds us that if you kill the program you will have to wait a short @@ -2813,7 +2820,7 @@ it out as a known limitation it is not a bug but a feature.
The author noted that in macOS the colours might be wrong. They gave a solution. @@ -2837,7 +2844,7 @@ player become bigger, stay away from blocks!
This program will very likely crash if no arg is given.
@@ -2878,7 +2885,7 @@ rely on the entry as the below shows. One should be able to do:The author stated:
@@ -2903,7 +2910,7 @@ result. Error messages become garbled, though.The program doesn’t look at the header of files so if it’s passed something hat @@ -2912,7 +2919,7 @@ is not compressed data it’s likely to crash.
The program assumes that The author wrote: When you run it on a JSON file you will see something like:EOF is -1. This can be fixed but at this time it is
@@ -2945,7 +2952,7 @@ use 8 * sizeof(typ) bits per place. It does not work when CHA
2018/algmyr
STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/algmyr/prog.c
Information: 2018/algmyr/index.html
2018/hou
STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/hou/prog.c
Information: 2018/hou/index.html
where [] is the cursor. When this happens if you hit enter (this is necessary
or else it’ll happen again) and then exit again (ctrl-e) and run prog again
it’ll be okay.
The author stated that if you make a typo it can happen that the boot loader can crash and halt. If this is the case type ctrl-e to quit the emulator and try again.
@@ -3004,7 +3011,7 @@ in the case of compiled code it won’t be executable).The author wrote the following:
@@ -3054,7 +3061,7 @@ this program has nothing to do with a hand.Certain input can crash this program. The file @@ -3062,7 +3069,7 @@ this program has nothing to do with a hand.
The author pointed out that some implementations of wc(1) show different
@@ -3070,7 +3077,7 @@ values but his implementation matches that of macOS and FreeBSD.
Cody Boone Ferguson fixed the scripts so @@ -3102,7 +3109,7 @@ ideal if this was not the case.
There are two things to be aware of with this entry.
@@ -3131,7 +3138,7 @@ in the directory:As a backtrace quine this entry is SUPPOSED to segfault so this should not be @@ -3139,7 +3146,7 @@ touched either.
The author stated the following:
@@ -3169,7 +3176,7 @@ touched either.The author wrote that there are a number of differences from what one might @@ -3179,7 +3186,7 @@ remarks in the sections Syntax and
The author wrote that if you decide to change networks or use a different input @@ -3199,7 +3206,7 @@ a crash.
This program will not validate input so it might fail or get stuck if invoked @@ -3208,7 +3215,7 @@ erroneously.
The author noted that if the program runs out of memory it is likely to crash.
@@ -3223,7 +3230,7 @@ ignored except line feeds (preserved) and tabs (expanded to 8 spaces).’This entry is known to crash if no arg is specified. Although easy to fix it is @@ -3234,7 +3241,7 @@ either. But can you figure out why this happens?
The author stated that bad things happen if the entered move is outside of the @@ -3248,7 +3255,7 @@ move.
There are some things that might appear to be bugs but are actually features or @@ -3258,7 +3265,7 @@ things that are misinterpreted as bugs. See the
The author noted that the program only supports WAV files that have @@ -3267,7 +3274,7 @@ audio channels.
The author listed the following limitations:
diff --git a/bugs.md b/bugs.md index 702c5b1a1..9a0f6ba5a 100644 --- a/bugs.md +++ b/bugs.md @@ -401,11 +401,11 @@ something was noted by the author, the judges, a consequence of earlier requirements for winning entries or the purpose was to do something that might appear to be buggy. An example of system specific entries: -[1984/mullender](%%REPO_URL%%/1984/mullender/mullender.c) (see below and the [FAQ](faq.html) -for a version that works in modern systems) is very system specific and was -before system specific winning entries were discouraged. This is an all time -personal favourite of Landon Curt Noll. Run the alternate code to understand why -this might be (along with how strange the source code is :-) ). +[1984/mullender](%%REPO_URL%%/1984/mullender/mullender.c) (see below for a +version that works in modern systems) is very system specific and was before +system specific winning entries were discouraged. This is an all time personal +favourite of Landon Curt Noll. Run the alternate code to understand why this +might be (along with how strange the source code is :-) ). An example where a crash is not a bug: [2019/endoh](%%REPO_URL%%/2019/endoh/prog.c) is supposed to crash. There are others that are also supposed to crash or that are @@ -466,6 +466,17 @@ you should see something like: without a newline after the `\`. This is not a bug. +clang say that main() mus
args but these versions do not object to 1 arg. However as the char macro
seems more obscure and it is possible that a new version of clang will be even
more strict the int i parameter in main() was moved to be inside main(),
-set to non-zero (setting i to 0 will not work). This is way main() has zero
+set to non-zero (setting i to 0 will not work). This is why main() has zero
args.
Observe how on line 29 there is a call to main() which does pass in a
parameter. It has never been observed to be an error to pass in too many
@@ -487,10 +487,6 @@ but not clang - or at least some versions.
Cody also fixed this to not crash when no arg is specified. Note that if the arg -is not a positive number it will not do anything useful or anything at all. -This was fixed on 30 October 2023 after the bug status was changed from INABIAF -(it’s not a bug it’s a feature) to bug.
clang object to the number of args of main(), saying that it must
be 0, 2 or 3. The version this has been observed in does not actually object to
1 arg but it is entirely possible that this changes so a second arg (that’s not
-needed and is unused) has been added just in case.
+needed and is unused) has been added just in case. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Cody also added the script primes.sh which allows one
to check the output for the first N prime numbers of the output, where N is
either the default or user specified. The inspiration was the previous try
@@ -1749,7 +1747,9 @@ start and end character.
main() though when it comes to 1 arg it is
only in an error message if say 4 args are used. This is out of an abundance of
caution as it’s quite possible that clang or the ANSI C committee end up further
-changing this.
+changing this. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Yusuke also noted that there is a bug in the program where right after starting it moves towards the right but if you click the mouse it goes back.
clang whine about the number of args on top of what typ
In particular some versions claim that they only allow 0, 2 or 3 args. It
appears that they do allow 1 but for instance 4 is not allowed. However as it’s
quite possible they will ‘fix’ this defect it would be better to have this not
-be a problem at such a time.
+be a problem at such a time. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Cody also added the bas1.sh script to simplify running the program.
Cody also added a second arg to main() out of an abundance of caution as some
-versions of clang whine about the number of args to main(). These versions
+versions of clang complain about the number of args to main(). These versions
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
possible though that this will change so it is fixed in case this happens. As it
is mostly just through the C pre-processor Cody added a new macro to make the
-code look like the original with just an extra arg.
In some versions of clang -Wno-int-conversion had to be added to the
CSILENCE variable of the Makefile.
Cody also added the try.sh script to show the output of some @@ -2513,7 +2519,9 @@ occurs.
Cody made main() have two args out of an abundance of caution as some versions
of clang say that main() can only have 0, 2 or 3 args. These versions accept 1
arg but it is entirely possible that they fix this so this should prevent it
-from breaking if that happens.
Cody added the try.sh script to make it easier to try the commands that we suggested. One command was not added, that of the to use command.
@@ -3039,7 +3047,9 @@ a lot of numbers this will be harder to see). discovered it will not work otherwise.Cody, out of an abundance of caution for clang, added a second arg to main()
as some versions complain about the number of args and although they accept 1 it
-is entirely possible it will eventually be that they don’t.
Cody also added the try.sh script and various data
files: kopczynski-a to demonstrate what happens when art more
like a letter is fed to the program and the kopczynski*-rev files which are
@@ -3424,7 +3434,9 @@ it to the repo as well.
Cody, out of an abundance of caution for clang’s defects, made main() have
2 args instead of 1 as some versions report that main() must have 0, 2 or 3
-args, even though at least one of those versions allows 1 arg only.
Cody also added the try.sh script for easier use of the entry to show the clock update in real time.
Cody, out of an abundance of caution, added a second arg to main() as some
versions of clang complain about not only the type of each arg to main() but
-the number of args as well.
Cody also added the try.sh script.
Cody added the video file boing-ball.mp4 which is the demo the +
Cody added the video file +boing-ball.mp4 which is the demo the author referred to.
ints to longs
and now it does work with 64-bit systems as well as 32-bit systems.
Cody also added the try.sh script.
-Cody added the following words of wisdom: '"this" is not a pipe but "!" is'.
Cody added the following words of wisdom: '"this" is not a pipe but "|" is'.
Cody also changed Cody also changed argv to be not const char ** butchar , mostly out of an
+argv to be not const char ** but char **, mostly out of an
abundance of caution in case clang, which already imposes restrictions on the
-types of args to main() including to do with `char
main() including to do with char **, decides to further
+restrict them. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Cody also restored the original code from the archive.
And although the URL works for now (via redirect), Cody changed the website linked to in the recipe file to the domain that the old one currently redirects @@ -3847,7 +3864,9 @@ not found.
Cody also (out of an abundance of caution for clang(1) which is strict with
-arg type and count to main()) added a second (unused) arg to main().
main()) added a second (unused) arg to main(). See
+FAQ 4.6 - Why was arg count and/or type changed in main() in some
+older entries? for more details.
clang object to the number of args of main(), saying that it
must be 0, 2 or 3. The version this has been observed in does not actually
object to 1 arg but it is entirely possible that this changes so a second arg
-(that’s not needed and is unused) has been added just in case.
+(that’s not needed and is unused) has been added just in case. See FAQ 4.6 -
+Why was arg count and/or type changed in main() in some older
+entries? for more details.
Cody also added explicit linking of libm (-lm) for systems that do not do this
(Linux doesn’t seem to but macOS does).
Cody also added alternate code that should diff --git a/thanks-for-help.md b/thanks-for-help.md index 00f23ca81..327f363d9 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -108,7 +108,7 @@ allow this. Some versions of `clang` say that `main()` must have either 0, 2 or args but these versions do not object to 1 arg. However as the `char` macro seems more obscure and it is possible that a new version of `clang` will be even more strict the `int i` parameter in `main()` was moved to be inside `main()`, -set to non-zero (setting `i` to 0 will not work). This is way `main()` has zero +set to non-zero (setting `i` to 0 will not work). This is why `main()` has zero args. Observe how on line 29 there is a call to `main()` which does pass in a @@ -140,11 +140,6 @@ To see the difference from start to fixed: [Cody](#cody) added the [try.sh](%%REPO_URL%%/1984/laman/try.sh) script. -Cody also fixed this to not crash when no arg is specified. Note that if the arg -is not a positive number it will not do anything useful or anything at all. -This was fixed on 30 October 2023 after the bug status was changed from INABIAF -(it's not a bug it's a feature) to bug. -