From c8c88eaa96b806e43bff19f672f035c6deab971d Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 20 Mar 2024 06:21:04 -0700 Subject: [PATCH] Fix bug statuses of 2000/dlowe The doesn't work with some platforms is wrong. It's the perl version and the author noted this. There is however a bug that was noted in the bugs file that was not in the README.md file. This has been moved in the bugs.md file and README.md file to above the INABIAF part. --- 2000/dlowe/README.md | 2 +- 2000/dlowe/index.html | 4 +- bugs.html | 337 +++++++++++++++++++++--------------------- bugs.md | 120 ++++++++------- 4 files changed, 229 insertions(+), 234 deletions(-) diff --git a/2000/dlowe/README.md b/2000/dlowe/README.md index 94236f204..0b7a3d170 100644 --- a/2000/dlowe/README.md +++ b/2000/dlowe/README.md @@ -18,8 +18,8 @@ perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"' The current status of this entry is: ``` -STATUS: doesn't work with some platforms - please help us fix STATUS: known bug - please help us fix +STATUS: INABIAF - please **DO NOT** fix ``` For more detailed information see [2000 dlowe bugs](../../bugs.html#2000_dlowe). diff --git a/2000/dlowe/index.html b/2000/dlowe/index.html index 1a4e8a446..1428b8815 100644 --- a/2000/dlowe/index.html +++ b/2000/dlowe/index.html @@ -146,8 +146,8 @@ Location: US - United States of America

… just in case the Makefile does not figure this out for you.

Bugs and (Mis)features:

The current status of this entry is:

-
STATUS: doesn't work with some platforms - please help us fix
-STATUS: known bug - please help us fix
+
STATUS: known bug - please help us fix
+STATUS: INABIAF - please **DO NOT** fix

For more detailed information see 2000 dlowe bugs.

To use:

./dlowe [file ...]
diff --git a/bugs.html b/bugs.html index 129d2a1e3..1212f66c2 100644 --- a/bugs.html +++ b/bugs.html @@ -1202,89 +1202,47 @@ is in the index.html file as something to try and ponder.

There was no IOCCC in 1999.

2000

2000/dlowe

-

STATUS: doesn’t work with some platforms - please help us fix

+

STATUS: known bug - please help us fix

Source code: 2000/dlowe/dlowe.c

Information: 2000/dlowe/index.html

-

This MIGHT be better described as doesn’t work with some versions of perl: -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. This does not exist in the code, seemingly, -but it might be that this is impossible to fix without getting a perl upgrade. -In any event the below details a problem. Another bug that happens in linux also -is below.

-

In macOS this program crashes. A tip from Cody is that the code that crashes is:

-
perl_eval_sv
-(newSVpv("_:$_=               <> ; defined               or exit; @ARGV"
-"=split; __:$_=             shift;defined or             goto _; chomp "
-";(m*^\\x70oO"              "\\x74$*i)?(pri"              "nt \"$_ w\\x"
-"61s h\\145r\\x"            "65!\\n\"):((m*"            "^\\s\\*(-?\\d+"
-"(\\.\\d+)?)\\s"            "\\*$*)?(push@SS            ,$1):(&{chr(((o"
-"rd)%39)+3**4)x2             } )); goto __;             sub ff { @SS= ("
-")} sub __{print            \"stack empty\\"            "n\"} sub ss{$#"
-"SS<0 and goto &            __; print $SS[$"            "#SS].\"\\n\"} "
-"sub SS{ $#SS<0              and goto &__ ;              print pop @SS}"
-"sub _ { print              \"divide by zer"            "o\\n\"}sub ii{"
-"map{ print\"$_"            "\\n\" } reverse            @SS} sub AUTOLO"
-"AD { print\"un"            "implemented\\n"            "\"} sub gg{ $#"
-"SS<0 and goto              &__;push@SS,$SS[            $#SS]} sub uu{ "
-"$#SS<1 and goto            &__;$SS[ $#SS]+=            $SS[$#SS-1];$SS"
-"[$#SS-1]=$SS[$"            "#SS]-$SS[$#SS-"            "1]; $SS[$#SS]-"
-"=$SS[$#SS-1]}                   ",0),0                   );
-

and in particular it appears that it is the perl itself. In other words if one -changes it to be:

-
perl_eval_sv(newSVpv("",0),0);
-

it will not crash. But of course it won’t do anything either. So it’s more -specifically that the call to newSVpv() crashes the code but INSIDE -(key point!) the call to perl_eval_sv() that does it. Given what the author -stated and that the version of perl is < than 5.6.0 that might be exactly what -is going on.

-

The example command above should print:

-
$ echo "13 14 15 16 17 + - * / p" | ./dlowe
--0.0515873015873016
-

and that’s what it shows in linux.

-

Note that with different perl libraries in macOS (for instance from -Homebrew and MacPorts it will -likely print different warnings when compiling. It was observed that with -Homebrew it does not report any warnings but with MacPorts it results in a total -of 92 warnings! Nonetheless neither works okay and both crash.

-

STATUS: known bug - please help us fix

The author gives an example command:

-
echo "7 P 6 d P P 8 p" | ./dlowe | tr 876 tpo
+
echo "7 P 6 d P P 8 p" | ./dlowe | tr 876 tpo

which should print out poot but it doesn’t, not in linux and not in macOS.

In linux it doesn’t crash but it doesn’t print anything out either.

In macOS it crashes; it might appear to not crash in macOS but this is because of the pipeline. If you remove the | tr 876 tpo part of the command you will see that it does indeed crash!

The reason for this not working is really strange.

-
$ echo "7 P 6 d P P 8 p" | ./dlowe
-7668
-$ echo "7 P 6 d P P 8 p" | ./dlowe | grep 7
-$
+
$ echo "7 P 6 d P P 8 p" | ./dlowe
+7668
+$ echo "7 P 6 d P P 8 p" | ./dlowe | grep 7
+$

Why? Is it writing to stdout? Let’s try some other things:

-
$ echo 7668 | tr 876 tpo
-poot
+
$ echo 7668 | tr 876 tpo
+poot

Okay so we know that it SHOULD work. But we also know something funny is going on with stdout and the entry. Another experiment:

-
$ echo "7 P 6 d P P 8 p" | ./dlowe 1>&2 | grep 7
-7668
+
$ echo "7 P 6 d P P 8 p" | ./dlowe 1>&2 | grep 7
+7668

Okay so now it sees it, grep. But watch!

-
$ echo "7 P 6 d P P 8 p" | ./dlowe 2>foo 1>&1
-7668
-$ cat foo
+
$ echo "7 P 6 d P P 8 p" | ./dlowe 2>foo 1>&1
+7668
+$ cat foo

.. so at this hour it does appear to be writing to stdout but yet somehow it doesn’t? But watch:

-
$ echo "7 P 6 d P P 8 p" | ./dlowe 1>foo 1>&1
-$ cat foo
-$
+
$ echo "7 P 6 d P P 8 p" | ./dlowe 1>foo 1>&1
+$ cat foo
+$

Well this explains why the tr does not transliterate it to poot but why is this happening? Why can’t it be redirected to another file even?

If it could be figured out why it’s not writing to stdout and yet at the same time is writing to stdout one bug could be fixed. Maybe it’s the perl messing with things but we don’t know.

Other commands do work, however, and give the appropriate output, such as:

-
$ echo 1 2 + p | ./dlowe
-3
+
$ echo 1 2 + p | ./dlowe
+3

so something is wrong with some commands/operators.

Another feature that does work in linux is:

-
$ echo poot | ./dlowe
-poot was here!
+
$ echo poot | ./dlowe
+poot was here!

Can you help fix these problems?

Cody provided the C code that creates an unformatted perl script that will just print ‘unimplemented’ for operators but it seems to work in some other ways (see @@ -1292,29 +1250,29 @@ below for how to go further than unimplemented) which is the exact perl from the C program except that it has the #!/usr/bin/env perl and use warnings; as well. A note below might suggest that doing this creates incomplete perl. Anyway:

-
#include <stdio.h>
-int main(void)
-{
-    printf("#!/usr/bin/env perl\nuse warnings;_:$_=               <> ; defined               or exit; @ARGV"
-    "=split; __:$_=             shift;defined or             goto _; chomp "
-    ";(m*^\\x70oO"              "\\x74$*i)?(pri"              "nt \"$_ w\\x"
-    "61s h\\145r\\x"            "65!\\n\"):((m*"            "^\\s\\*(-?\\d+"
-    "(\\.\\d+)?)\\s"            "\\*$*)?(push@SS            ,$1):(&{chr(((o"
-    "rd)%%39)+3**4)x2             } )); goto __;             sub ff { @SS= ("
-    ")} sub __{print            \"stack empty\\"            "n\"} sub ss{$#"
-    "SS<0 and goto &            __; print $SS[$"            "#SS].\"\\n\"} "
-    "sub SS{ $#SS<0              and goto &__ ;              print pop @SS}"
-    "sub _ { print              \"divide by zer"            "o\\n\"}sub ii{"
-    "map{ print\"$_"            "\\n\" } reverse            @SS} sub AUTOLO"
-    "AD { print\"un"            "implemented\\n"            "\"} sub gg{ $#"
-    "SS<0 and goto              &__;push@SS,$SS[            $#SS]} sub uu{ "
-    "$#SS<1 and goto            &__;$SS[ $#SS]+=            $SS[$#SS-1];$SS"
-    "[$#SS-1]=$SS[$"            "#SS]-$SS[$#SS-"            "1]; $SS[$#SS]-"
-    "=$SS[$#SS-1]}");
-}
+
#include <stdio.h>
+int main(void)
+{
+    printf("#!/usr/bin/env perl\nuse warnings;_:$_=               <> ; defined               or exit; @ARGV"
+    "=split; __:$_=             shift;defined or             goto _; chomp "
+    ";(m*^\\x70oO"              "\\x74$*i)?(pri"              "nt \"$_ w\\x"
+    "61s h\\145r\\x"            "65!\\n\"):((m*"            "^\\s\\*(-?\\d+"
+    "(\\.\\d+)?)\\s"            "\\*$*)?(push@SS            ,$1):(&{chr(((o"
+    "rd)%%39)+3**4)x2             } )); goto __;             sub ff { @SS= ("
+    ")} sub __{print            \"stack empty\\"            "n\"} sub ss{$#"
+    "SS<0 and goto &            __; print $SS[$"            "#SS].\"\\n\"} "
+    "sub SS{ $#SS<0              and goto &__ ;              print pop @SS}"
+    "sub _ { print              \"divide by zer"            "o\\n\"}sub ii{"
+    "map{ print\"$_"            "\\n\" } reverse            @SS} sub AUTOLO"
+    "AD { print\"un"            "implemented\\n"            "\"} sub gg{ $#"
+    "SS<0 and goto              &__;push@SS,$SS[            $#SS]} sub uu{ "
+    "$#SS<1 and goto            &__;$SS[ $#SS]+=            $SS[$#SS-1];$SS"
+    "[$#SS-1]=$SS[$"            "#SS]-$SS[$#SS-"            "1]; $SS[$#SS]-"
+    "=$SS[$#SS-1]}");
+}

Compiling this you can generate:

-
#!/usr/bin/env perl
-use warnings;_:=               <> ; defined               or exit; =split; __:=             shift;defined or             goto _; chomp ;(m*^oOi)?(print " ws hr!\n"):((m*^\s\*(-?\d+(\.\d+)?)\s\*)?(push@SS            ,):(&{chr(((ord)%39)+3**4)x2             } )); goto __;             sub ff { @SS= ()} sub __{print            "stack empty\n"} sub ss{$#SS<0 and goto &            __; print $SS[$#SS]."\n"} sub SS{ $#SS<0              and goto &__ ;              print pop @SS}sub _ { print              "divide by zero\n"}sub ii{map{ print"\n" } reverse            @SS} sub AUTOLOAD { print"unimplemented\n"} sub gg{ $#SS<0 and goto              &__;push@SS,$SS[            $#SS]} sub uu{ $#SS<1 and goto            &__;$SS[ $#SS]+=            $SS[$#SS-1];$SS[$#SS-1]=$SS[$#SS]-$SS[$#SS-1]; $SS[$#SS]-=$SS[$#SS-1]}
+
#!/usr/bin/env perl
+use warnings;_:=               <> ; defined               or exit; =split; __:=             shift;defined or             goto _; chomp ;(m*^oOi)?(print " ws hr!\n"):((m*^\s\*(-?\d+(\.\d+)?)\s\*)?(push@SS            ,):(&{chr(((ord)%39)+3**4)x2             } )); goto __;             sub ff { @SS= ()} sub __{print            "stack empty\n"} sub ss{$#SS<0 and goto &            __; print $SS[$#SS]."\n"} sub SS{ $#SS<0              and goto &__ ;              print pop @SS}sub _ { print              "divide by zero\n"}sub ii{map{ print"\n" } reverse            @SS} sub AUTOLOAD { print"unimplemented\n"} sub gg{ $#SS<0 and goto              &__;push@SS,$SS[            $#SS]} sub uu{ $#SS<1 and goto            &__;$SS[ $#SS]+=            $SS[$#SS-1];$SS[$#SS-1]=$SS[$#SS]-$SS[$#SS-1]; $SS[$#SS]-=$SS[$#SS-1]}

Here is example input/output:

p
 stack empty
@@ -1331,32 +1289,32 @@ p
 how this does not happen in the C program in linux!) but if one uses ‘p’ by
 itself it will print what’s on the stack (for example).

To not get ‘unimplemented’ you can remove from the perl:

-
sub AUTOLOAD { print"unimplemented\n"}
+
sub AUTOLOAD { print"unimplemented\n"}

(Note that the author stated this was used for exception handling so another possibility is that the C code doesn’t generate the correct perl and indeed even spaces is known to break the perl in at least one way, syntax errors, but maybe others too.)

Here is an example run of several operations in the perl script after removing that subroutine:

-
$ echo 5 5 p | ./dlowe.pl
-5
-$ echo 5 5 + p | ./dlowe.pl
-5
-Undefined subroutine &main::UU called at ./pl.pl line 2, <> line 1.
-$ echo 5 5 * p | ./dlowe.pl
-5
-Undefined subroutine &main::ww called at ./pl.pl line 2, <> line 1.
-$ echo 5 5 - p | ./dlowe.pl
-5
-Undefined subroutine &main::WW called at ./pl.pl line 2, <> line 1.
-$ echo 5 5 / p | ./dlowe.pl
-5
-Undefined subroutine &main::YY called at ./pl.pl line 2, <> line 1.
-$ echo 5 P | ./dlowe.pl
-5$ echo p | ./dlowe.pl
-stack empty
-$ echo P | ./dlowe.pl
-stack empty
+
$ echo 5 5 p | ./dlowe.pl
+5
+$ echo 5 5 + p | ./dlowe.pl
+5
+Undefined subroutine &main::UU called at ./pl.pl line 2, <> line 1.
+$ echo 5 5 * p | ./dlowe.pl
+5
+Undefined subroutine &main::ww called at ./pl.pl line 2, <> line 1.
+$ echo 5 5 - p | ./dlowe.pl
+5
+Undefined subroutine &main::WW called at ./pl.pl line 2, <> line 1.
+$ echo 5 5 / p | ./dlowe.pl
+5
+Undefined subroutine &main::YY called at ./pl.pl line 2, <> line 1.
+$ echo 5 P | ./dlowe.pl
+5$ echo p | ./dlowe.pl
+stack empty
+$ echo P | ./dlowe.pl
+stack empty

Note the undefined subroutine error: that happens with commands that are not even in the program. Again the author used AUTOLOAD for exception handling so it seems likely that there is something missing (which the below shows as well). @@ -1369,13 +1327,52 @@ works in the code, at least in some cases.

invalid input. But as can be seen by the input I (Cody) gave the input is not actually incorrect. It is also curious to note that it ends up printing what’s on the stack at that point:

-
$ echo 5 5 + p | ./dlowe.pl
-unimplemented
-5
+
$ echo 5 5 + p | ./dlowe.pl
+unimplemented
+5

which 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.

-

2000/primenum

STATUS: INABIAF - please DO NOT fix

+

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 +code that crashes is:

+
perl_eval_sv
+(newSVpv("_:$_=               <> ; defined               or exit; @ARGV"
+"=split; __:$_=             shift;defined or             goto _; chomp "
+";(m*^\\x70oO"              "\\x74$*i)?(pri"              "nt \"$_ w\\x"
+"61s h\\145r\\x"            "65!\\n\"):((m*"            "^\\s\\*(-?\\d+"
+"(\\.\\d+)?)\\s"            "\\*$*)?(push@SS            ,$1):(&{chr(((o"
+"rd)%39)+3**4)x2             } )); goto __;             sub ff { @SS= ("
+")} sub __{print            \"stack empty\\"            "n\"} sub ss{$#"
+"SS<0 and goto &            __; print $SS[$"            "#SS].\"\\n\"} "
+"sub SS{ $#SS<0              and goto &__ ;              print pop @SS}"
+"sub _ { print              \"divide by zer"            "o\\n\"}sub ii{"
+"map{ print\"$_"            "\\n\" } reverse            @SS} sub AUTOLO"
+"AD { print\"un"            "implemented\\n"            "\"} sub gg{ $#"
+"SS<0 and goto              &__;push@SS,$SS[            $#SS]} sub uu{ "
+"$#SS<1 and goto            &__;$SS[ $#SS]+=            $SS[$#SS-1];$SS"
+"[$#SS-1]=$SS[$"            "#SS]-$SS[$#SS-"            "1]; $SS[$#SS]-"
+"=$SS[$#SS-1]}                   ",0),0                   );
+

and in particular it appears that it is the perl itself. In other words if one +changes it to be:

+
perl_eval_sv(newSVpv("",0),0);
+

it will not crash. But of course it won’t do anything either. So it’s more +specifically that the call to newSVpv() crashes the code but INSIDE +(key point!) the call to perl_eval_sv() that does it. Given what the author +stated and that the version of perl is < than 5.6.0 which the author states can +crash this makes sense.

+

The example command above should print:

+
$ echo "13 14 15 16 17 + - * / p" | ./dlowe
+-0.0515873015873016
+

and that’s what it shows in linux.

+

Note that with different perl libraries in macOS (for instance from +Homebrew and MacPorts it will +likely print different warnings when compiling. It was observed that with +Homebrew it does not report any warnings but with MacPorts it results in a total +of 92 warnings! Nonetheless neither works okay and both crash.

+

2000/primenum

+

STATUS: INABIAF - please DO NOT fix

Source code: 2000/primenum/primenum.c

Information: 2000/primenum/index.html

This program does not do what you might think it does! Running it like:

@@ -1391,7 +1388,7 @@ try to fix the crashing of this code except to challenge yourself (if you think that it’ll be worth your two second fix :-) ). If you do fix it please do not make a pull request.

2000/rince

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2000/rince/rince.c

Information: 2000/rince/index.html

If DISPLAY is not set the program will very likely crash, do something strange @@ -1399,7 +1396,7 @@ make a pull request.

fire! :-) ).

2001

2001/anonymous

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2001/anonymous/anonymous.c

Information: 2001/anonymous/index.html

Cody Boone Ferguson fixed this so that it @@ -1420,8 +1417,8 @@ can run ELF binaries but cannot compile 32-bit binaries.

this program will very likely crash or do something strange like slaughter the elves of Imladris :-(

2001/bellard

-

STATUS: INABIAF - please DO NOT fix

-

STATUS: doesn’t work with some platforms - please help us fix

+

STATUS: INABIAF - please DO NOT fix

+

STATUS: doesn’t work with some platforms - please help us fix

Source code: 2001/bellard/bellard.c

Information: 2001/bellard/index.html

The two statuses might seem contradictory but that is a complicated question. @@ -1469,7 +1466,7 @@ the compiler won’t work there.

and it can be run by itself for fun in modern systems, which was not possible before the fixes there.

2001/dgbeards

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2001/dgbeards/dgbeards.c

Information: 2001/dgbeards/index.html

This program deliberately crashes if it loses (which is what it aims to do).

@@ -1486,7 +1483,7 @@ that version 2.95 works but maybe others do as well. Do you have a fix? We would appreciate your help!

If you want to try and fix this (mis)feature, you are welcome to try.

2001/kev

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2001/kev/kev.c

Information: 2001/kev/index.html

Sometimes when one player presses q it will result in broken pipe on the other @@ -1508,7 +1505,7 @@ set. In other words both have to be ASCII or EBCDIC - not one of each.

The author stated that there is a cat man page for this program in case one wanted to install it as a tool but this is missing.

2001/schweikh

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2001/schweikh/schweikh.c

Information: 2001/schweikh/index.html

The glob pattern must match the whole string. See the author’s comments for @@ -1576,7 +1573,7 @@ sleeping.

2004

2004/gavin

STATUS: compiled executable crashes - please help us fix

-

STATUS: doesn’t work with some platforms - please help us fix

+

STATUS: doesn’t work with some platforms - please help us fix

Source code: 2004/gavin/gavin.c

Information: 2004/gavin//index.html

Segmentation fault will occur in some systems. For instance on macOS with the @@ -1658,11 +1655,11 @@ gavin_clobber: gavin_clean gavin_files: boot.b lilo.conf prim gavin_install.txt

The current (Makefile was modified to try and fit into the current IOCCC build environment.

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

See known features in the index.html for things that are not bugs but documented (mis)features.

2004/jdalbec

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2004/jdalbec/jdalbec.c

Information: 2004/jdalbec/index.html

The author stated that:

@@ -1685,14 +1682,14 @@ incorrect results (e.g., generation 1 starting from a string of 257 `1`s will be calculated as `11`); the remark from the previous paragraph applies here also.

2004/sds

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2004/sds/sds.c

Information: 2004/sds/index.html

The generated code will very likely segfault or do something not intended if not given the right args. See the index.html file for the correct syntax.

2005

2005/anon

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2005/anon/anon.c

Information: 2005/anon/index.html

This program sometimes will create unsolvable puzzles :-) just to hook you. @@ -1704,14 +1701,14 @@ details on this.

strange. This might also happen if you specify excessively large board dimensions. Try 100 100 100 for instance and see what happens!

2005/giljade

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2005/giljade/giljade.c

Information: 2005/giljade/index.html

This entry will very likely segfault or do something strange if the source code does not exist.

This entry requires that sed and make are in the path.

2005/mikeash

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2005/mikeash/mikeash.c

Information: 2005/mikeash/index.html

The author states:

@@ -1743,7 +1740,7 @@ nowhere near

Basically, the [LISP][] interpreter is good for some basic math operations, and for running itself.

2005/mynx

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2005/mynx/mynx.c

Information: 2005/mynx/index.html

Cody Boone Ferguson notes that, though @@ -1755,7 +1752,7 @@ set up in order to give http commands. This is not a bug but it’s worth pointi out as it won’t work on as many websites as it used to including the IOCCC website itself.

2005/sykes

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2005/sykes/sykes.c

Information: 2005/sykes/index.html

The author stated the below points of interest.

@@ -1788,14 +1785,14 @@ with at least computer.tofu input file:

12a13
 #define gets(c) fgets((c),PI,stdin)&&(((c)[strlen((c))-1]='\0'),c!=NULL)

2006/borsanyi

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2006/borsanyi/borsanyi.c

Information: 2006/borsanyi/index.html

The string specified must be <= 42 characters and may only consist of the characters in the regex a-z_A-Z0-9@.-. Breaking these constraints will end up with possibly corrupt GIF files.

2006/monge

-

STATUS: doesn’t work with some platforms - please help us fix

+

STATUS: doesn’t work with some platforms - please help us fix

Source code: 2006/monge/monge.c

Information: 2006/monge/index.html

This program requires x86 (with an x87 FPU) or x86_64 machine and it requires @@ -1807,10 +1804,10 @@ 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!

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Incorrect formulas will ungracefully crash the program.

2006/sykes1

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2006/sykes1/sykes1.c

Information: 2006/sykes1/index.html

The author stated:

@@ -1825,7 +1822,7 @@ unique solutions. If you pick a number higher than 460464 (24x19186) the program will return without outputting a solution. If you can wait that long.

2006/toledo2

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2006/toledo2/toledo2.c

Information: 2006/toledo2/index.html

Cody Boone Ferguson fixed this program to @@ -1850,7 +1847,7 @@ case-sensitive.

There was no IOCCC in 2010.

2011

2011/borsanyi

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2011/borsanyi/borsanyi.c

Information: 2011/borsanyi/index.html

For a great amount of data points the program will crash, depending on your @@ -1871,7 +1868,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.

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

The author states the following:

If you want to try and fix this (mis)feature, you are welcome to try.

2011/fredriksson

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2011/fredriksson/fredriksson.c

Information: 2011/fredriksson/index.html

The author stated that there are a number of features and limitations. As the @@ -1890,7 +1887,7 @@ list is rather long see oth features and limitations and remarks instead.

2011/richards

-

STATUS: doesn’t work with some platforms - please help us fix

+

STATUS: doesn’t work with some platforms - please help us fix

Source code: 2011/richards/richards.c

Information: 2011/richards/index.html

This does not appear to work with macOS, resulting in a segfault (and sometimes @@ -2051,7 +2048,7 @@ unconfirmed and it’s not known when CONFIG_DYNAMIC_CODE_SIGNING w defined.

Do you have a fix? We welcome it!

2011/vik

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2011/vik/vik.c

Information: 2011/vik/index.html

The author stated that the program will crash if no argument is passed to the @@ -2059,14 +2056,14 @@ program though we note that your computer might also 2012

2012/blakely

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2012/blakely/blakely.c

Information: 2012/blakely/index.html

The author stated:

If there is a division by zero, square-root of a negative number, or similar
 operation, then the results are undefined.

2012/deckmyn

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2012/deckmyn/deckmyn.c

Information: 2012/deckmyn/index.html

The author stated:

@@ -2097,7 +2094,7 @@ Therefore, when preparing music in a file, care should be taken that the last musical element of a line is only 2 characters!

The manual referred to is here.

2012/dlowe

-

STATUS: INABIAF - please DO NOT fix

+

STATUS: INABIAF - please DO NOT fix

Source code: 2012/dlowe/dlowe.c

Information: 2012/dlowe/index.html

The author stated:

@@ -2109,7 +2106,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)
  • Cannot build or run without X11 (or an X11 compatibility layer).
  • 2012/tromp

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2012/tromp/tromp.c

    Information: 2012/tromp/index.html

    The author stated:

    @@ -2129,7 +2126,7 @@ looking into a null-pointer environment: will likely dump core.

    2012/vik

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2012/vik/vik.c

    Information: 2012/vik/index.html

    The author stated that the program will crash if no argument is passed to the @@ -2139,7 +2136,7 @@ might also 2013

    2013/cable2

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/cable2/cable2.c

    Information: 2013/cable2/index.html

    The author stated:

    @@ -2157,7 +2154,7 @@ antialiasing interferes with color detection in “color” mode. and endianness conversion would make the source too large for IOCCC rule 2).

    2013/dlowe

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/dlowe/dlowe.c

    Information: 2013/dlowe/index.html

    This program will possibly crash or draw something strange with 0 args. Then @@ -2174,7 +2171,7 @@ something funny (or will it? :-) ) and when will it just do nothing?

    used.

    2013/endoh1

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/endoh1/endoh1.c

    Information: 2013/endoh1/index.html

    From the author:

    @@ -2188,7 +2185,7 @@ used. section.

    –

    2013/endoh3

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/endoh3/endoh3.c

    Information: 2013/endoh3/index.html

    From the author:

    @@ -2199,18 +2196,18 @@ such as C2E2.

    A workaround is inserting a whitespace: C2 E2.

    –

    2013/endoh4

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/endoh4/endoh4.c

    Information: 2013/endoh4/index.html

    Invalid input files will very likely crash the program.

    2013/hou

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/hou/hou.c

    Information: 2013/hou/index.html

    This program will not terminate on its own; you must kill hou (but not Qiming Hou :-) ) yourself. This should not be fixed.

    2013/mills

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2013/mills/mills.c

    Information: 2013/mills/index.html

    The author reminds us that if you kill the program you will have to wait a short @@ -2221,7 +2218,7 @@ have experience with socket programming :-) ) fix. However as the author pointed it out as a known limitation it is not a bug but a feature.

    2014

    2014/maffiodo1

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2014/maffiodo1/prog.c

    Information: 2014/maffiodo1/index.html

    The author noted that in macOS the colours might be wrong. They gave a solution. @@ -2243,7 +2240,7 @@ player become bigger, stay away from blocks!

    –

    but since it’s documented it’s considered a feature, not a bug to fix.

    2014/maffiodo2

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2014/maffiodo2/prog.c

    Information: 2014/maffiodo2/index.html

    This program will very likely crash if no arg is given.

    @@ -2276,7 +2273,7 @@ rely on the entry as the below shows. One should be able to do:

    IOCCC

    2015

    2015/hou

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2015/hou/prog.c

    Information: 2015/hou/index.html

    The author stated:

    @@ -2299,14 +2296,14 @@ result. Error messages become garbled, though.

    –

    2015/mills2

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2015/mills2/prog.c

    Information: 2015/mills2/index.html

    The program doesn’t look at the header of files so if it’s passed something hat is not compressed data it’s likely to crash.

    The program depends on little endian systems.

    2015/schweikhardt

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2015/schweikhardt/prog.c

    Information: 2015/schweikhardt/index.html

    The program assumes that EOF is -1. This can be fixed but at this time it is @@ -2325,7 +2322,7 @@ use 8 * sizeof(typ) bits per place. It does not work when CHA

    There was no IOCCC in 2017.

    2018

    2018/algmyr

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2018/algmyr/algmyr.c

    Information: 2018/algmyr/index.html

    The author wrote:

    @@ -2342,7 +2339,7 @@ channel id outside valid range). One argument in particular causes an infinite loop printing whitespace.

    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

    When you run it on a JSON file you will see something like:

    @@ -2365,7 +2362,7 @@ likely see:

    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.

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    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.

    @@ -2378,7 +2375,7 @@ referred to by the author but there was likely no typo involved.

    exiting the program or else the next time you run it the file will not exist (or in the case of compiled code it won’t be executable).

    2018/vokes

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2018/vokes/vokes.c

    Information: 2018/vokes/index.html

    The author wrote the following:

    @@ -2422,19 +2419,19 @@ this program has nothing to do with a hand.

    2019

    2019/adamovsky

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/adamovsky/prog.c

    Information: 2019/adamovsky/index.html

    Certain input can crash this program. The file crash.unl is an example file.

    2019/burton

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/burton/prog.c

    Information: 2019/burton/index.html

    The author pointed out that some implementations of wc(1) show different values but his implementation matches that of macOS and FreeBSD.

    2019/ciura

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/ciura/prog.c

    Information: 2019/ciura/index.html

    Cody Boone Ferguson fixed the scripts so @@ -2462,7 +2459,7 @@ in the de.sh/de.alt.sh scripts:

    The author does not it uses gets() and one will get warnings but it would be ideal if this was not the case.

    2019/duble

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/duble/prog.c

    Information: 2019/duble/index.html

    There are two things to be aware of with this entry.

    @@ -2489,13 +2486,13 @@ in the directory:

    find . -exec file '{}' \;|grep socket|cut -f 1 -d: | xargs rm -f

    though one might want to check that the program is not currently running. :-)

    2019/endoh

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/endoh/prog.c

    Information: 2019/endoh/index.html

    As a backtrace quine this entry is SUPPOSED to segfault so this should not be touched either.

    2019/karns

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/karns/prog.c

    Information: 2019/karns/index.html

    The author stated the following:

    @@ -2517,7 +2514,7 @@ not encountered this myself).
  • The program contains some unused code and data.
  • 2019/lynn

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/lynn/prog.c

    Information: 2019/lynn/index.html

    The author wrote that there are a number of differences from what one might @@ -2525,7 +2522,7 @@ expect. Rather than duplicate the information we refer you to the author’s remarks in the sections Syntax and Caveats.

    2019/mills

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/mills/prog.c

    Information: 2019/mills/index.html

    The author wrote that if you decide to change networks or use a different input @@ -2545,14 +2542,14 @@ the hard limit with limit -h stacksize and set it with limit stacksize 65532 (replacing 65532 with the actual hard limit).


    2019/poikola

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/poikola/prog.c

    Information: 2019/poikola/index.html

    This program will not validate input so it might fail or get stuck if invoked erroneously.

    Also, the maximum file size is 1GB.

    2019/yang

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2019/yang/prog.c

    Information: 2019/yang/index.html

    The author noted that if the program runs out of memory it is likely to crash.

    @@ -2561,7 +2558,7 @@ those CRs are silently dropped. In fact, most control codes are sil ignored except line feeds (preserved) and tabs (expanded to 8 spaces).’

    2020

    2020/burton

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2020/burton/prog.c

    Information: 2020/burton/index.html

    This entry is known to crash if no arg is specified. Although easy to fix it is @@ -2570,7 +2567,7 @@ but it shouldn’t be made into a pull request).

    It will also show funny output with more than one arg. This should not be fixed either. But can you figure out why this happens?

    2020/carlini

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2020/carlini/prog.c

    Information: 2020/carlini/index.html

    The author stated that bad things happen if the entered move is outside of the @@ -2582,7 +2579,7 @@ lose.

    move.

    If you have audible bells enabled the program will beep at every turn.

    2020/ferguson1

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2020/ferguson1/prog.c

    Information: 2020/ferguson1/index.html

    There are some things that might appear to be bugs but are actually features or @@ -2590,14 +2587,14 @@ things that are misinterpreted as bugs. See the bugs.html and troubleshooting.html files for details.

    2020/giles

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2020/giles/prog.c

    Information: 2020/giles/index.html

    The author noted that the program only supports WAV files that have exactly 16 bits per sample, but it allows any sample rate and any number of audio channels.

    2020/otterness

    -

    STATUS: INABIAF - please DO NOT fix

    +

    STATUS: INABIAF - please DO NOT fix

    Source code: 2020/otterness/prog.c

    Information: 2020/otterness/index.html

    The author listed the following limitations:

    diff --git a/bugs.md b/bugs.md index b10ea6028..81cd8437a 100644 --- a/bugs.md +++ b/bugs.md @@ -1645,69 +1645,10 @@ There was no IOCCC in 1999. ## 2000/dlowe -### STATUS: doesn't work with some platforms - please help us fix -### Source code: [2000/dlowe/dlowe.c](2000/dlowe/dlowe.c) -### Information: [2000/dlowe/index.html](2000/dlowe/index.html) - -This **MIGHT** be better described as doesn't work with some versions of perl: -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`. This does not exist in the code, seemingly, -but it might be that this is impossible to fix without getting a perl upgrade. -In any event the below details a problem. Another bug that happens in linux also -is below. - -In macOS this program crashes. A tip from Cody is that the code that crashes is: - -```c -perl_eval_sv -(newSVpv("_:$_= <> ; defined or exit; @ARGV" -"=split; __:$_= shift;defined or goto _; chomp " -";(m*^\\x70oO" "\\x74$*i)?(pri" "nt \"$_ w\\x" -"61s h\\145r\\x" "65!\\n\"):((m*" "^\\s\\*(-?\\d+" -"(\\.\\d+)?)\\s" "\\*$*)?(push@SS ,$1):(&{chr(((o" -"rd)%39)+3**4)x2 } )); goto __; sub ff { @SS= (" -")} sub __{print \"stack empty\\" "n\"} sub ss{$#" -"SS<0 and goto & __; print $SS[$" "#SS].\"\\n\"} " -"sub SS{ $#SS<0 and goto &__ ; print pop @SS}" -"sub _ { print \"divide by zer" "o\\n\"}sub ii{" -"map{ print\"$_" "\\n\" } reverse @SS} sub AUTOLO" -"AD { print\"un" "implemented\\n" "\"} sub gg{ $#" -"SS<0 and goto &__;push@SS,$SS[ $#SS]} sub uu{ " -"$#SS<1 and goto &__;$SS[ $#SS]+= $SS[$#SS-1];$SS" -"[$#SS-1]=$SS[$" "#SS]-$SS[$#SS-" "1]; $SS[$#SS]-" -"=$SS[$#SS-1]} ",0),0 ); -``` - -and in particular it appears that it is the perl itself. In other words if one -changes it to be: - -```c -perl_eval_sv(newSVpv("",0),0); -``` - -it will not crash. But of course it won't do anything either. So it's more -specifically that the call to `newSVpv()` crashes the code but _INSIDE_ -(key point!) the call to `perl_eval_sv()` that does it. Given what the author -stated and that the version of perl is < than 5.6.0 that might be exactly what -is going on. - -The example command above _should_ print: - -```sh -$ echo "13 14 15 16 17 + - * / p" | ./dlowe --0.0515873015873016 -``` - -and that's what it shows in linux. - -Note that with different perl libraries in macOS (for instance from -[Homebrew](https://brew.sh) and [MacPorts](https://www.macports.org) it will -likely print different warnings when compiling. It was observed that with -Homebrew it does not report any warnings but with MacPorts it results in a total -of 92 warnings! Nonetheless neither works okay and both crash. - ### STATUS: known bug - please help us fix +### Source code: [2000/dlowe/dlowe.c](2000/dlowe/dlowe.c) +### Information: [2000/dlowe/index.html](2000/dlowe/index.html) The author gives an example command: @@ -1912,6 +1853,63 @@ which 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. +### STATUS: INABIAF - please **DO NOT** fix + +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 +code that crashes is: + +```c +perl_eval_sv +(newSVpv("_:$_= <> ; defined or exit; @ARGV" +"=split; __:$_= shift;defined or goto _; chomp " +";(m*^\\x70oO" "\\x74$*i)?(pri" "nt \"$_ w\\x" +"61s h\\145r\\x" "65!\\n\"):((m*" "^\\s\\*(-?\\d+" +"(\\.\\d+)?)\\s" "\\*$*)?(push@SS ,$1):(&{chr(((o" +"rd)%39)+3**4)x2 } )); goto __; sub ff { @SS= (" +")} sub __{print \"stack empty\\" "n\"} sub ss{$#" +"SS<0 and goto & __; print $SS[$" "#SS].\"\\n\"} " +"sub SS{ $#SS<0 and goto &__ ; print pop @SS}" +"sub _ { print \"divide by zer" "o\\n\"}sub ii{" +"map{ print\"$_" "\\n\" } reverse @SS} sub AUTOLO" +"AD { print\"un" "implemented\\n" "\"} sub gg{ $#" +"SS<0 and goto &__;push@SS,$SS[ $#SS]} sub uu{ " +"$#SS<1 and goto &__;$SS[ $#SS]+= $SS[$#SS-1];$SS" +"[$#SS-1]=$SS[$" "#SS]-$SS[$#SS-" "1]; $SS[$#SS]-" +"=$SS[$#SS-1]} ",0),0 ); +``` + +and in particular it appears that it is the perl itself. In other words if one +changes it to be: + +```c +perl_eval_sv(newSVpv("",0),0); +``` + +it will not crash. But of course it won't do anything either. So it's more +specifically that the call to `newSVpv()` crashes the code but _INSIDE_ +(key point!) the call to `perl_eval_sv()` that does it. Given what the author +stated and that the version of perl is < than 5.6.0 which the author states can +crash this makes sense. + +The example command above _should_ print: + +```sh +$ echo "13 14 15 16 17 + - * / p" | ./dlowe +-0.0515873015873016 +``` + +and that's what it shows in linux. + +Note that with different perl libraries in macOS (for instance from +[Homebrew](https://brew.sh) and [MacPorts](https://www.macports.org) it will +likely print different warnings when compiling. It was observed that with +Homebrew it does not report any warnings but with MacPorts it results in a total +of 92 warnings! Nonetheless neither works okay and both crash. + + + ## 2000/primenum ### STATUS: INABIAF - please **DO NOT** fix