Files
ioccc/bugs.html
T
Landon Curt Noll aa70cf88d0 build several top level HTML files
We build several top level HTML files whose content
comes from top level markdown files:

- CODE_OF_CONDUCT.html
- README.html
- bugs.html
- contact.html
- faq.html
- thanks-for-help.html

Added new `bin/gen-top-md2html.sh` to perform the above.

Added `make gen_top_md2html` rule to top level Makefile.
Added `make gen_top_md2html` to `make quick_www` and `make www`.

Improved top level jump links for `authors.html`.
Updated `bin/gen-authors.sh` to improve the top level jump links.
Changed `bin/gen-authors.sh` version from "1.0.1 2024-02-23"
to "1.1 2024-02-25".

Changed typo of "TITIE" into "TITLE".

Fixed `bin/subst.entry-index.sh` as per the above typo.
Changed `bin/subst.entry-index.sh` version from "1.2.1 2024-02-23"
to "1.2.2 2024-02-25".

Updated the `inc/md2html.cfg` config file to perform the above.

Performed `make quick_www` which updated `2000/natori/index.html`.
2024-02-25 00:15:52 -08:00

3400 lines
222 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- The original markdown content was formed by the tool: bin/gen-top-md2html.sh -->
<!-- The HTML was converted from markdown by the tool: bin/md2html.sh -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="./ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>The International Obfuscated C Code Contest</title>
<meta name="description" content="Bugs and (Mis)features of IOCCC entries">
<meta name="keywords" content="IOCCC, Bugs and (Mis)features, bugs, features, misfeatures">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<img src="./png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>IOCCC entry Bugs and (Mis)features</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/begin-row.default.html -->
<div class="row">
<!-- END: this line ends content from: inc/begin-row.default.html -->
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
<div class="leftcolumn">
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/sidenav.default.html -->
<div class="sidenav">
<a href="#content">Jump to contents</a>
</div>
<hr>
<div class="sidenav">
<a href="./index.html">IOCCC Home</a>
<a href="./years.html">Winning Entries</a>
<a href="./authors.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="./news.html">IOCCC News</a>
<a href="./faq.html#submit">How to enter the IOCCC</a>
<a href="./faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="./bugs.html">Bugs &amp; (mis)features</a>
<a href="./faq.html#fix_an_entry">Fixing IOCCC entries</a>
<a href="./faq.html#fix_web_site">Fixing the web site</a>
<a href="./faq.html#fix_author">Fixing author info</a>
<a href="./thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="./judges.html">The IOCCC Judges</a>
<a href="./contact.html">Contacting the IOCCC</a>
</div>
<hr>
<div class="sidenav">
<a href="#top">Jump to top</a>
</div>
<!-- END: this line ends content from: inc/sidenav.default.html -->
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
<div class="rightcolumn">
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<a name="content"></a>
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h1 id="bugs-and-misfeatures">Bugs and (Mis)features</h1>
<p>There are a number of known problems with IOCCC entries: many of
which have to do with differences between today’s compiler environments
and those of today. In some cases the original code has a bug, some of
which were recently discovered and many of which were fixed. In some
cases attempt to port older code to more modern environments introduced
bugs.</p>
<p>The following is a known list of <strong>BUGS and
(mis)FEATURES</strong> in IOCCC entries.</p>
<p>Can you fix/improve entries not under the INABIAF (it’s not a bug
it’s a feature)? You are <strong>VERY WELCOME</strong> to try.</p>
<p>NOTE: currently this file is mostly for us. We are not yet ready for
help except for dead links and missing files. We will remove this notice
when this changes. We will note this below for each status we’re not yet
ready for help with.</p>
<p>As far as how to help: please submit your fixes in a <a
href="https://github.com/ioccc-src/temp-test-ioccc/pulls">GitHub pull
request</a> (with ONE PULL REQUEST <em>PER</em> FIX, please)!</p>
<p>We will be <strong>happy to credit anyone who submits successful <a
href="https://github.com/ioccc-src/temp-test-ioccc/pulls">GitHub pull
requests</a></strong> in the <a href="/thanks-for-help.md">thanks</a>
file. If you’re a previous winner we will add a link to your winning
entries in the file (if you’re not a previous winner we can add a link
to your GitHub page or personal website if you have one, should you
wish).</p>
<p>If you do fix an entry please feel free to delete the entry from this
file! Otherwise if you wish to not worry about it we can do that to make
sure the format is consistent and clean.</p>
<p>THANK YOU!</p>
<h2 id="to-the-winning-authors">To the winning authors:</h2>
<p>If you’re the author of an entry that has been fixed and you find it
against your liking <strong>PLEASE</strong> let us know and we’ll be
happy to undo any fixes even if it takes away some instructional value
or even usability. _In this case we’re <strong>VERY SORRY_</strong>
about it: it’s a fine line, we know, and we tried to use careful
judgement but invariably some might have been the wrong decision. Thank
you for understanding!</p>
<p>I (<a href="/authors.html#Cody_Boone_Ferguson">Cody Boone
Ferguson</a>) accept the blame in some cases; when working on getting
entries to compile sometimes I got carried away with it and there might
be that I fixed some things that should not have been fixed. I am
correcting these mistakes as I come across them but if I miss any please
let the judges or me know.</p>
<h3 id="on-all-fixes-improvements-changes">ON <strong>ALL</strong> FIXES
/ IMPROVEMENTS / CHANGES</h3>
<p>Make <strong>ABSOLUTE CERTAIN</strong> that you test the entry
<em>BEFORE</em> <strong>AND</strong> <em>AFTER</em> your changes! This
includes output and the same input functionality! Sometimes it might
seem to be fine but is actually not! We will note some where this is
known to happen (if it’s not yet fixed). This has actually already
happened to us. Sometimes it is okay: some entries are known to not work
but they can still have improvements (rarer situation but it’s
happened). Some might have slightly different output but which is not a
problem for instance a newline after output in <a
href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>’s
changing it to <a href="1994/ldb/ldb.c">1994/ldb</a> use
<code>fgets()</code> from <code>gets()</code>.</p>
<p>Make <strong>ABSOLUTE CERTAIN</strong> that you read the README.md
file <em>BEFORE</em> your changes as it’s important to see that the code
is doing what it is supposed to. In the case that it’s not obvious (some
README.md files do not even have commands to try or even explain how to
use it!) then you should either skip the entry OR ask someone who will
know e.g. us.</p>
<p>Make <strong>ABSOLUTE CERTAIN</strong> that you read the next
section, the list of statuses and the related information, BEFORE you
submit a pull request!</p>
<p><strong>BE VERY AWARE</strong> that sometimes fixing an entry for one
platform will break it under another so if you have more than one
platform (e.g. macOS and linux) it would be wise to test it under all
that you have access to. Otherwise we can do that. Of course if the
entry does not work under any platform and you fix it for one that’s
more than fine (and it has been done numerous times).</p>
<p>Again, THANK YOU!</p>
<h1
id="list-of-statuses---please-read-before-fixing-you-may-skip-if-youre-only-interested-in-knowing-about-entries-with-known-issues">LIST
OF STATUSES - PLEASE READ BEFORE FIXING (you may skip if you’re only
interested in knowing about entries with known issues)</h1>
<p>NOTE: when going through the entries you can skip to the next entry
(some are detailed explanations) by searching for
<code>^## STATUS:</code> in your editor (or searching for it - probably
without the <code>^</code> in your browser). For a specific year try
<code>^# YYYY</code> where <code>YYYY</code> is the year as a
number.</p>
<p>Entries below have one or more of the following
<em><strong>STATUS</strong></em> values. Please see the text below for
more information. If an entry has more than one status it means that
either they all apply or they compliment each other. For instance <a
href="2004/gavin/gavin.c">2004/gavin</a> crashes but it also doesn’t
even compile with some platforms/architectures.</p>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
has been working on resolving these issues and has fixed many but you’re
welcome to have a go at it too (though he’ll be very sad if he doesn’t
have a chance to at first fix it :-( so you might want to hold off for
now :-) .. or not :-) ). He hopes to have most of the remaining entries
resolved in the near future but nevertheless if you’re okay making
people very sad you may have a go at the entries :-) <a
href="/authors.html#Yusuke_Endoh">Yusuke Endoh</a> has also fixed a
number of entries though at this point he does not know it. :-) Cody
will remove this part later on.</p>
<h2 id="general-notes-about-the-statuses-and-making-fixes">General notes
about the statuses and making fixes</h2>
<h3 id="compiler-warnings-are-very-rarely-a-problem">Compiler warnings
are very rarely a problem</h3>
<p>In general warnings should NOT be addressed. The only time they
should be CONSIDERED is when the entry does not work. However note that
sometimes trying to fix the warnings will actually introduce bugs! Other
times ‘fixing’ them will break the entry (see below).</p>
<p>Below in some entries we do list some warnings that definitely should
be ignored (including some introduced by fixes) but we do not list them
all: trying to keep track of them all would be impractical especially as
different compilers give different warnings.</p>
<p>Another type of warning that would be hard to keep track of is
different data sizes on different platforms. These tend to be required
at the risk that sometimes the entry will not work for certain
platforms, some of which might or might not be fixable; a good example
where it was required to change and is okay is when <a
href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a> fixed
the segfault in macOS of <a href="1994/paul/paul.c">1989/paul</a>:
changing the <code>int *</code> to a <code>long *</code> was required
and it works just as well with linux.</p>
<p>But even if they are fixable (which will likely be hard to do) it’s
almost certain that such code would be just as non-portable (importable
? :-) ).</p>
<p>In rare cases they are valid. For instance Cody noticed in linux the
following warning in <a href="1985/applin/applin.c">1985/applin</a> with
gcc:</p>
<pre><code>applin.c:1:78: warning: incompatible implicit declaration of built-in function &#39;execlp&#39; [-Wbuiltin-declaration-mismatch]
1 | main(v,c)char**c;{for(v[c++]=strdup(&quot;Hello, world!\n&quot;);(!!c)[*c]&amp;&amp;(v--||--c&amp;&amp;execlp(*c,*c,c[!!c]+!!c,!c));**c=!c)write(!!*c,*c,!!**c);}
| ^~~~~~</code></pre>
<p>and this reminded him of his fix to <a
href="1984/anonymous/anonymous.c">1984/anonymous</a>. In the case of
<code>1984/anonymous</code> it was a bit more involved but with
<code>1985/applin</code> one need only add to the Makefile
<code>-include unistd.h</code>. So there are some cases where fixing
warnings can fix a problem but in general they should be ignored even if
they’re annoying.</p>
<p>Hopefully with the example entries listed above you get the idea.</p>
<h3 id="general-request-on-original-code">General request on original
code:</h3>
<p>If you’re fixing an entry please make as <em>FEW CHANGES AS
POSSIBLE</em>! This is to make it as close to the original but allowing
it to work. This might be less of a problem when providing alternate
versions but it might still be nice to have it as close as possible to
the original. See also below two points.</p>
<h3 id="request-for-one-liners">Request for one-liners:</h3>
<p>For one-liners <em>PLEASE KEEP THE FILE ONE LINE IF AT ALL
POSSIBLE</em>! If it needs an include you can update the Makefile
<code>CINCLUDE</code> variable. For instance if it needs
<code>stdio.h</code> you could do <code>-include stdio.h</code>. Please
leave a space after the <code>=</code> in the Makefile. You may also
have extra long lines if this seems useful to make it a one-liner even
if it kind of makes it longer than what the judges consider a one-liner.
Thank you!</p>
<h3 id="on-layout-of-program-source">On layout of program source:</h3>
<p>If you make changes <em>PLEASE TRY AND KEEP THE SOURCE CODE LAYOUT AS
CLOSE TO THE ORIGINAL AS POSSIBLE</em>. This might not always be
possible and if you have an editor that does formatting it can cause
problems. Sometimes formatters can even break code! <a
href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a> has
experienced this many times with vim so he tends to disable all format
options when formatting code. In vim you should be able to do that
with:</p>
<pre><code>:set formatoptions=</code></pre>
<h2 id="status-known-bug---please-help-us-fix">STATUS: known bug -
please help us fix</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Entries with this status have one or more bugs that need to be fixed.
Are you able to fix it? We welcome your help!</p>
<p>An important point to note is that there is a very fine line when
fixing bugs where it might sometimes border on tampering with the
program. And after all, these are not meant to be maintainable or even
good programming style! Use careful judgement when fixing bugs
please!</p>
<h2
id="status-possible-bug-possibly-depending-on-system---please-help-test-and-if-necessary-fix">STATUS:
possible bug (possibly depending on system) - please help test and if
necessary fix</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Entries with this status might or might not have a bug possibly
depending on the system. In these entries it’s unknown if there is a bug
and sometimes it’s because we do not remember and sometimes we don’t
have the appropriate system or environment to test and fix any possible
problems.</p>
<h2
id="status-might-not-be-completely-functional---can-you-confirm">STATUS:
might not be completely functional - can you confirm?</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Although these entries <em>appear</em> to work for one or more
reasons we’re unsure if they are completely functional. Can you confirm
this? Please let us know so we can fix it!</p>
<h2
id="status-probable-bug-possibly-depending-on-system---please-help-test-and-if-necessary-fix">STATUS:
probable bug (possibly depending on system) - please help test and if
necessary fix</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Entries with this status almost certainly have a bug or some other
problem. The issue or issues might depend on the system much like the
above <em>STATUS: possible bug (possibly depending on system)</em>.</p>
<h2
id="status-doesnt-work-with-some-platforms---please-help-us-fix">STATUS:
doesn’t work with some platforms - please help us fix</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Entries with this status do not work under some OSes and/or
architectures (and/or something else?). Please help us to fix it!</p>
<h2
id="status-doesnt-work-with-some-compilers---please-provide-alternative-code-or-fix-for-more-compilers">STATUS:
doesn’t work with some compilers - please provide alternative code or
fix for more compilers</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Some entries do not work with some compilers. A good example is <a
href="1992/lush/lush.c">1992/lush</a> which uses error messages from the
compiler to generate its output.</p>
<p>If you can provide code that works for multiple compilers without too
much tampering this is okay though it’s probably not possible with the
above mentioned entry; otherwise it would be better to provide alternate
code. In some cases it might be better to provide alternate code anyway.
Use a judgement call here as best you can manage.</p>
<h2
id="status-main-function-args-not-allowed---please-help-us-fix">STATUS:
main() function args not allowed - please help us fix</h2>
<p>NOTE: it appears that most if not all of these have been fixed except
perhaps for <a href="1989/westley/westley.c">1989/westley</a> but this
has probably been fixed as much as possible given the nature of how it
generates code: the entry itself compiles but two versions of code it
generates does not work with clang.</p>
<p>However some still might have problems of some kind or another and
some might not yet be located as an additional defect of clang was
noticed where <code>main()</code> is not allowed four args or one
arg.</p>
<p>This is what the status means, however.</p>
<p>Entries with this status have a problem in that the args to main()
are not of a specific type or there are too many due to this being
allowed in earlier C. Some compilers like clang have a defect where they
do not allow this and some versions have an additional defect where they
only allow 0, 2 or 3 args, the latter of which affected
<code>1989/westley</code>, so these entries do not work with clang.</p>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
looked at the source code of clang and reported that there is no way to
override the requirement of arg types so these entries will fail to
compile with clang. That’s why in some entries he fixed he did it by
adding a function called <code>pain()</code>. :-) He did not check for
the number of args as that was discovered later but he suspects it’s the
same issue.</p>
<p><strong>NOTE for macOS users</strong>: please be aware that
<em>gcc</em> under macOS <strong>is actually clang</strong> despite the
fact it might appear to be gcc: no symlink and both gcc and clang exist
but the gcc is clang which you’ll see if you run
<code>gcc --version</code>.</p>
<p>A tip and some fix methods from Cody: in the older days args to
main() not given a type were implicit ints but when they’re required to
be <code>char **</code> this can cause a problem. In some cases Cody was
able to use a <code>char *</code> inside <code>main()</code> (see <a
href="1989/tromp/tromp.c">1989/tromp/tromp.c</a> and <a
href="1986/holloway">1986/holloway/holloway.c</a> for two examples
though done slightly differently). In other cases he was able to
dereference the pointers to be used like an int and other times a cast
was necessary. He used other various techniques to get them to compile.
In some cases this introduced a problem but typically if not always that
problem exists with compilers that are less strict.</p>
<h2
id="status-main-has-only-one-arg---try-and-make-it-have-2-or-3">STATUS:
main() has only one arg - try and make it have 2 or 3</h2>
<p>Because some versions of clang complain about the number of args of
<code>main()</code> and in particular say (when it has four, for
instance) that it’s only allowed to have 0, 2 or 3 args, numerous
entries had a second arg added to <code>main()</code> (if they only had
one). This is in case clang adds further restrictions which is not
impossible especially as it already claims having only one arg is not
allowed. At this time (04 Feb 2024) there is one entry known (it is
possible that not all were checked) that has this problem but it’s not
as simple as the others to fix without breaking it.</p>
<h2 id="status-compiled-executable-crashes---please-help-us-fix">STATUS:
compiled executable crashes - please help us fix</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>While such entries can compile, the resulting executable sometimes or
always crashes.</p>
<p>NOTE: this does NOT apply to entries under the INABIAF status (though
they’re not mutually exclusive in some cases).</p>
<p>REMINDER: if you’re debugging a crash it will be very helpful to have
<code>-O0 -g</code> or if you can <code>-ggdb3</code> when compiling as
that will help with debugging symbols.</p>
<h2 id="status-uses-gets---change-to-fgets-if-possible">STATUS: uses
gets() - change to fgets() if possible</h2>
<p>NOTE: we’re still locating entries and working on fixes with this
status so we’re not yet ready for help. We will remove this when we
are.</p>
<p>Entries with this status use <code>gets()</code> which is unsafe
because it has no limit on the length of the string. <a
href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a> has
fixed several of these and he’s working on others in between fixing
other things.</p>
<p>There’s a very good reason for this even though it is bordering on
tampering entries: in modern systems one will get possibly alarming and
certainly annoying warnings during at least one of compiling, linking
and execution. In macOS it’s most annoying as it happens during
execution (also compilation) with the warning being interspersed with
the output of the program, often causing confusing output with the
entry. A good example that was fixed is <a
href="1990/tbr/tbr.c">1990/tbr</a>.</p>
<p>Cody provided some important notes on this status with respect to
fixing / changing entries:</p>
<ol start="0" type="1">
<li><p>In some cases changing the entry to use <code>fgets()</code> will
break the entry and in some cases cause it to crash. Where this is known
we will document it. Some of these Cody is also off and on working
on.</p></li>
<li><p>You <strong>MUST</strong> check the output before and after to
make sure that it remains the same. Sometimes the output might not be
immediately obviously wrong but is. We will document known examples as
we come across them.</p></li>
<li><p><code>gets()</code> does NOT STORE the <code>'\n'</code> but
<code>fgets()</code> DOES! This is one of the reasons some of the
entries break when changed to <code>fgets()</code>. Cody has fixed some
of these but there are others he hasn’t had time to address or even
discover yet.</p></li>
<li><p>Just because you don’t see the string <code>gets</code> in the
code does not mean it’s not used. It is after all the International
<em>Obfuscated C Code</em> Contest! :-) Sometimes it will be in the
Makefile and other times it will be obfuscated in other ways. Compilers
and linkers tend to warn about its use (and as noted in macOS it also
happens at execution) and this is a good way to find entries that use it
even if it’s not visible in the code.</p></li>
</ol>
<p><em>NOTE</em>: this status is <em>NOT necessarily mutually
exclusive</em> with the <em>INABIAF</em> (it’s not a bug it’s a feature)
status. The reason for this is due to warnings during compiling, linking
and/or runtime, sometimes causing confusing output (as noted above).</p>
<p>Sometimes <code>getline(3)</code> will work but note that this
function also stores the newline just like <code>fgets(3)</code>.</p>
<h2 id="status-missing-files---please-provide-them">STATUS: missing
file(s) - please provide them</h2>
<p>In these entries one file or multiple files are missing from the
repo. In some cases these files can be found on the <a
href="https://www.ioccc.org">IOCCC website</a> but in other cases they
are entirely absent. In this case you’ll probably have to contact the
author (unless you are the author! :-) ).</p>
<h2 id="status-missing-make-rules---please-provide-them">STATUS: missing
make rules - please provide them</h2>
<p>In these entries one or more make rules noted by the author and/or
judges is/are missing. You might consider looking at the <a
href="/archive">archive</a> as a good place to find them.</p>
<h2 id="status-missing-or-dead-link---please-provide-them">STATUS:
missing or dead link - please provide them</h2>
<p>This is as they sound: a link is either missing or it’s no longer
valid. In many cases the <a href="https://web.archive.org">Internet
Wayback Machine</a> will be very useful but there happens to be numerous
links that this is not helpful. In other cases the URL has changed. Some
of these have been discovered by the Internet Wayback Machine with the
orange status.</p>
<h3 id="statuses-of-internet-wayback-machine-archive">Statuses of
Internet Wayback Machine archive:</h3>
<ul>
<li>Green (3xx): redirect (this has been used to find changes in
URL).</li>
<li>Orange (4xx): not found etc.</li>
<li>Blue: this is a good link (but note that this doesn’t mean that it’s
correct!).</li>
</ul>
<p>The archive website will tell you if the link was never captured.</p>
<h2 id="status-inabiaf---please-do-not-fix">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h2>
<h3 id="inabiaf-its-not-a-bug-its-a-feature--">INABIAF: It’s not a bug
it’s a feature :-)</h3>
<p>Entries with this status should NOT be touched (unless they have
another status that suggests that <em>that</em> issue can be changed):
they are system specific by design or are other things that are not
actually bugs or bugs even if they appear to be. Or they might be
documented bugs or things that simply are part of the entry. Nonetheless
they are noteworthy.</p>
<p>NOTE: the definition of this status changed over time. At one point
it was when 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:</p>
<p><a href="1984/mullender/mullender.c">1984/mullender</a> (see below
and the <a href="/faq.md">FAQ</a> 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 :-) ).</p>
<p>An example where a crash is not a bug: <a
href="2019/endoh/endoh.c">2019/endoh</a> is supposed to crash. There are
others that are also supposed to crash or that are known to segfault but
are considered features.</p>
<p>An important note is that if the README.md of the entry has a bug
status that says it can be fixed it can be. Otherwise it should not
be.</p>
<p>Nonetheless we challenge you to fix these entries for
educational/instructional value and/or enjoyment but we kindly request
that you <strong>DO NOT</strong> submit a pull request unless it’s a bug
or (mis)feature we would like you to fix! If you can’t figure it out
you’re invited to look at the git diffs, where there are some (some were
fixed earlier on but rolled back as both Cody and Landon individually
felt that the fix was tampering with the entry).</p>
<p>NOTE: in the case of <code>gets()</code> we’ve fixed some to avoid
the warning of the compiler, linker or even during runtime, depending on
the system. In <a href="1990/tbr/tbr.c">some cases like 1990/tbr</a> the
fix actually prevents confusing output (though that was not the only fix
made in that entry).</p>
<h3 id="exception-your-own-entries">Exception: your own entries</h3>
<p>Of course if you’re the author you’re welcome to fix your own entry,
prefer your own fix or suggest that they’re fixed!</p>
<h1
id="list-of-entries-by-year-sorted-in-alphabetical-order-per-year">List
of entries by year, sorted in alphabetical order per year</h1>
<h1 id="section">1984</h1>
<h2 id="decot">1984 decot</h2>
<h3 id="status-inabiaf---please-do-not-fix-1">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1984decotdedot.c">Source code: <a
href="1984/decot/decot.c">1984/decot/dedot.c</a></h3>
<h3 id="information-1984decotreadme.md">Information: <a
href="1984/decot/README.md">1984/decot/README.md</a></h3>
<p>The purpose of this program is to print out a string of rubbish. In
particular you should see something like:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./decot</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="st">&#39;&quot;,x); /*</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="st">\</span></span></code></pre></div>
<p>without a newline after the <code>\</code>. This is not a bug.</p>
<h2 id="mullender">1984 mullender</h2>
<h3 id="status-inabiaf---please-do-not-fix-2">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1984mullendermullender.c">Source code: <a
href="1984/mullender/mullender.c">1984/mullender/mullender.c</a></h3>
<h3 id="information-1984mullenderreadme.md">Information: <a
href="1984/mullender/README.md">1984/mullender/README.md</a></h3>
<p>Although there is an alt version and supplementary program added by
Cody that will work in modern systems, if you do not have a <a
href="https://en.wikipedia.org/wiki/VAX-11">VAX-11</a> or <a
href="https://en.wikipedia.org/wiki/PDP-11">PDP-11</a> to run the
original entry on it will not work. See the README.md for details on the
alternate versions.</p>
<p>Cody added and fixed the <a
href="1984/mullender/gentab.c">gentab.c</a> which is from the author’s
(or one of them, Mullender) remarks found by Cody. Cody fixed this to
compile and work (as best as he can determine: he has no VAX-11 or
PDP-11 or emulator to test it) but running the code on the binary itself
produces a <code>short[]</code> that can compile in modern systems
though it’ll not work.</p>
<h1 id="section-1">1985</h1>
<p>There are no known bugs and (Mis)features for entries in 1985.</p>
<h1 id="section-2">1986</h1>
<h2 id="august">1986 august</h2>
<h3 id="status-inabiaf---please-do-not-fix-3">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1986augustaugust.c">Source code: <a
href="1986/august/august.c">1986/august/august.c</a></h3>
<h3 id="information-1986augustreadme.md">Information: <a
href="1986/august/README.md">1986/august/README.md</a></h3>
<p>This entry is known to segfault after printing its output. It was
documented by the judges and shouldn’t be fixed.</p>
<h1 id="section-3">1987</h1>
<p>There are no known bugs and (Mis)features for entries in 1987.</p>
<h1 id="section-4">1988</h1>
<h2 id="dale">1988 dale</h2>
<h3 id="status-inabiaf---please-do-not-fix-4">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1988daledale.c">Source code: <a
href="1988/dale/dale.c">1988/dale/dale.c</a></h3>
<h3 id="information-1988dalereadme.md">Information: <a
href="1988/dale/README.md">1988/dale/README.md</a></h3>
<p>In linux it might happen that despite no error message or message
about doing so, the program drops a core file into the directory even
though the entry works and does not crash.</p>
<h1 id="section-5">1989</h1>
<h2 id="fubar">1989 fubar</h2>
<h3 id="status-known-bug---please-help-us-fix-1">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1989fubarfubar.c">Source code: <a
href="1989/fubar/fubar.c">1989/fubar/fubar.c</a></h3>
<h3 id="information-1989fubarreadme.md">Information: <a
href="1989/fubar/README.md">1989/fubar/README.md</a></h3>
<p>If you use either <code>fubar</code> or <code>ouroboros.c</code>
(it’s executable, see README.md for details) with a number &lt; 0 or
larger than, say 20, it’s very likely that the program will turn into an
infinite loop trying to compile code with syntax errors.</p>
<p>If you want to try and fix this (mis)feature, you are welcome to
try.</p>
<h2 id="robison">1989 robison</h2>
<h3 id="status-inabiaf---please-do-not-fix-5">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1989robisonrobison.c">Source code: <a
href="1989/robison/robison.c">1989/robison/robison.c</a></h3>
<h3 id="information-1989robisonreadme.md">Information: <a
href="1989/robison/README.md">1989/robison/README.md</a></h3>
<p>This program will very likely crash or break into tiny bits :-) if
you feed it numbers with non-binary digits.</p>
<p>There are also other cases where this can happen for instance using
unsupported operators like <code>/</code>. To see what operators are
supported check the source code.</p>
<h2 id="westley">1989 westley</h2>
<h3 id="status-known-bug---please-help-us-fix-2">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1989westleywestley.c">Source code: <a
href="1989/westley/westley.c">1989/westley/westley.c</a></h3>
<h3 id="information-1989westleyreadme.md">Information: <a
href="1989/westley/README.md">1989/westley/README.md</a></h3>
<p>With version 2 it sometimes segfaults even with the same input where
other times it does not. We don’t believe this is because of the fix
that lets some versions be compiled with clang. An example invocation
is:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ver2</span> <span class="op">&lt;</span> westley.c</span></code></pre></div>
<h3 id="a-useful-note-on-changingfixing-this-program">A useful note on
changing/fixing this program</h3>
<p>It should be noted that in additional to rot13 names there is code
that is the reverse of other code (also wrt names). See the source file
and the README.md (in the author’s remarks) for more details.</p>
<p>Fixing the (Mis)feature is likely to be a very difficult challenge
especially without breaking something else which is far more likely (see
below in tips from Cody). You are welcome to try and fix it if you
can!</p>
<h3 id="tips-from-cody">Tips from Cody:</h3>
<p>The reason this is crashing is that the array <code>irk</code> is
being accessed way out of bounds by the int <code>gnat</code>. For
instance:</p>
<pre><code>Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000401335 in main (ABBA@entry=&lt;optimized out&gt;, tang@entry=&lt;optimized out&gt;, gnat@entry=&lt;optimized out&gt;, Near@entry=&lt;optimized out&gt;)
at ver2.c:23
23 &amp;&amp;gnat!({)Near,noon,/*krelc*/)&lt;0&amp;&amp;(Near= - irk[-gnat--]-2)))&amp;&amp;main(ABBA,
(gdb) p gnat
$1 = -518733305</code></pre>
<h3 id="magic-of-the-entry">Magic of the entry:</h3>
<p>The real trouble is that the code is generated and in a complex way
or rather ways.</p>
<p>I will explain this a little bit (though it might be more than a bit
according to many :-) ) but that is all I can do for now. The program,
when used without any args, will print out what it reads. If one arg is
specified it will do a ROT13 of it. If two args are specified it will
print out the text backwards (<em>WITHOUT ROT13!</em>). If three args
are specified it will do both <strong><em>reversal AND
ROT13</em></strong>.</p>
<p>So <code>ver0</code> is the same as the main program;
<code>ver1</code> is the ROT13 of the code (but see below);
<code>ver2</code> will reverse the code and <code>ver3</code> will both
reverse and ROT13 the code. But it’s trickier than that as one might
expect.</p>
<p>The comments are processed too. Furthermore it happens that the last
line becomes the first and the first line becomes the last! Now if you
look at the code you’ll see on the first line:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="co">/**//*/};)/**/</span>pain<span class="op">(</span><span class="co">/*//**/</span>tang <span class="op">,</span>gnat<span class="co">/**//*/,ABBA~,0-0(avnz;)0-0,tang,raeN</span></span></code></pre></div>
<p>In <code>ver0</code> it’ll be the same but the others are more
interesting.</p>
<p>In <code>ver1</code> you’ll see on the last line:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>cnva<span class="op">((</span>vag<span class="op">)</span>NOON<span class="op">&amp;</span><span class="dv">2</span><span class="co">/*//*\\**/</span><span class="op">,</span>gnat<span class="op">,</span>tang <span class="op">,</span>NOON<span class="co">/**//*/(niam/**/</span><span class="op">);}</span><span class="co">/*//**/</span></span></code></pre></div>
<p>and on the first line:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="co">/**//*/};)/**/</span>cnva<span class="op">(</span><span class="co">/*//**/</span>gnat <span class="op">,</span>tang<span class="co">/**//*/,NOON~,0-0(niam;)0-0,gnat,enrA</span></span></code></pre></div>
<p>Observe that the ROT13 of <code>pain</code> is <code>cnva</code> and
the ROT13 of <code>main</code> is <code>znva</code>. The ROT13 of
<code>NOON</code> is <code>ABBA</code>. <code>vag</code> is ROT13 of
<code>int</code>, <code>gnat</code> and <code>tang</code> are ROT13 of
each other as well which is the reverse of the original (this is not
because it goes backwards (it doesn’t in this version) but because they
are ROT13 pairs!). <code>main</code> spelt backwards is
<code>niam</code> and <code>pain</code> spelt backwards is
<code>niap</code>. Furthermore see the Makefile for other defines that
had to be specified and for ver2 and ver3 (that both work with gcc) one
had to be undefined (search for <code>CDEFINE</code> and
<code>-U</code>). These details will be important momentarily.</p>
<p>As far as <code>NOON</code> and <code>ABBA</code> being ROT13 pairs,
notice how <code>NOON</code> is not in the original code but
<code>ABBA</code> is; but in other versions it becomes <code>NOON</code>
and they also have <code>abba</code> which the original code does
not!</p>
<p>Now notice how the <code>avnz</code> in the first line got changed to
<code>niam</code>, its ROT13 value. Notice also how some of these are in
comments!</p>
<p><code>main()</code> is in there somewhere and that had to be changed
to call <code>pain()</code> (see the <a
href="/thanks-for-help.md#1989_westley">thanks</a> file (see the
<em>1989/westley</em> section for details on how as this was not as
straight forward as it is for other entries) as well. Now if you notice
on that line you have in a comment <code>niam</code>. If you were to
change that to <code>niap</code> (pain backwards) that function would
end up as <code>pain()</code> in generated code! That’s assuming that
it’s just the reversal version, of course but ver1 is the ROT13
version.</p>
<p>These facts are bad enough but then you throw in the reverse of it
without ROT13 and then another version that has the reversal
<em>and</em> ROT13 then you can see it’s nigh impossible to fix if not
impossible.</p>
<p>The fix to get it to even compile with clang and then get the first
two (counting the original, <code>ver0</code>) to work was the hardest
fix I made due to how the comments in reverse and ROT13 of it all works
together, especially allowing all versions to compile with gcc. The only
reason that it doesn’t work completely with clang is the arg types of
main() (see if you can figure out how the change of <code>main()</code>
in <code>westley.c</code> is not carried over to versions 2 and 3!);
originally none of them compiled with clang.</p>
<p>But it was possible to get the ROT13 code to compile with clang but
the other versions, reversed as well as ROT13 and reversed code, proved
much more problematic. I got it to compile (or maybe mostly compile) all
versions with clang but I then carried it over to gcc in another system
and it had syntax errors.</p>
<p>That’s about all I can say for how it works as other things have to
be done too. Enjoy! :-)</p>
<h1 id="section-6">1990</h1>
<h2 id="baruch">1990 baruch</h2>
<h3 id="status-known-bug---please-help-us-fix-3">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1990baruchbaruch.c">Source code: <a
href="1990/baruch/baruch.c">1990/baruch/baruch.c</a></h3>
<h3 id="information-1990baruchreadme.md">Information: <a
href="1990/baruch/README.md">1990/baruch/README.md</a></h3>
<p>A point worth considering is that as the number passed into the
program gets bigger the number of lines of output gets substantially
larger and it takes much more time and resources to run as well. For
instance:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> for n in <span class="va">$(</span><span class="fu">seq</span> 1 18<span class="va">)</span><span class="kw">;</span> <span class="cf">do</span> <span class="bu">echo</span> <span class="st">&quot;</span><span class="va">$n</span><span class="st">&quot;</span><span class="kw">;</span> <span class="bu">echo</span> <span class="st">&quot;</span><span class="va">$n</span><span class="st">&quot;</span> <span class="kw">|</span> <span class="bu">time</span> <span class="st">&quot;./baruch&quot;</span> <span class="kw">|</span> <span class="fu">wc</span> <span class="at">-l</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="at">-E</span> <span class="at">-e</span> <span class="st">&#39;s/[[:space:]]//g&#39;</span><span class="kw">;</span> <span class="cf">done</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">1</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="ex">3</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 5% cpu 0.115 total</span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a><span class="ex">2</span></span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a><span class="ex">1</span></span>
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 64% cpu 0.004 total</span>
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true" tabindex="-1"></a><span class="ex">3</span></span>
<span id="cb9-9"><a href="#cb9-9" aria-hidden="true" tabindex="-1"></a><span class="ex">1</span></span>
<span id="cb9-10"><a href="#cb9-10" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 60% cpu 0.003 total</span>
<span id="cb9-11"><a href="#cb9-11" aria-hidden="true" tabindex="-1"></a><span class="ex">4</span></span>
<span id="cb9-12"><a href="#cb9-12" aria-hidden="true" tabindex="-1"></a><span class="ex">11</span></span>
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 64% cpu 0.003 total</span>
<span id="cb9-14"><a href="#cb9-14" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span>
<span id="cb9-15"><a href="#cb9-15" aria-hidden="true" tabindex="-1"></a><span class="ex">61</span></span>
<span id="cb9-16"><a href="#cb9-16" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 66% cpu 0.003 total</span>
<span id="cb9-17"><a href="#cb9-17" aria-hidden="true" tabindex="-1"></a><span class="ex">6</span></span>
<span id="cb9-18"><a href="#cb9-18" aria-hidden="true" tabindex="-1"></a><span class="ex">29</span></span>
<span id="cb9-19"><a href="#cb9-19" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 61% cpu 0.003 total</span>
<span id="cb9-20"><a href="#cb9-20" aria-hidden="true" tabindex="-1"></a><span class="ex">7</span></span>
<span id="cb9-21"><a href="#cb9-21" aria-hidden="true" tabindex="-1"></a><span class="ex">321</span></span>
<span id="cb9-22"><a href="#cb9-22" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 69% cpu 0.002 total</span>
<span id="cb9-23"><a href="#cb9-23" aria-hidden="true" tabindex="-1"></a><span class="ex">8</span></span>
<span id="cb9-24"><a href="#cb9-24" aria-hidden="true" tabindex="-1"></a><span class="ex">829</span></span>
<span id="cb9-25"><a href="#cb9-25" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 76% cpu 0.003 total</span>
<span id="cb9-26"><a href="#cb9-26" aria-hidden="true" tabindex="-1"></a><span class="ex">9</span></span>
<span id="cb9-27"><a href="#cb9-27" aria-hidden="true" tabindex="-1"></a><span class="ex">3521</span></span>
<span id="cb9-28"><a href="#cb9-28" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.00s user 0.00s system 87% cpu 0.005 total</span>
<span id="cb9-29"><a href="#cb9-29" aria-hidden="true" tabindex="-1"></a><span class="ex">10</span></span>
<span id="cb9-30"><a href="#cb9-30" aria-hidden="true" tabindex="-1"></a><span class="ex">7965</span></span>
<span id="cb9-31"><a href="#cb9-31" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.01s user 0.00s system 95% cpu 0.014 total</span>
<span id="cb9-32"><a href="#cb9-32" aria-hidden="true" tabindex="-1"></a><span class="ex">11</span></span>
<span id="cb9-33"><a href="#cb9-33" aria-hidden="true" tabindex="-1"></a><span class="ex">32161</span></span>
<span id="cb9-34"><a href="#cb9-34" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.05s user 0.00s system 98% cpu 0.053 total</span>
<span id="cb9-35"><a href="#cb9-35" aria-hidden="true" tabindex="-1"></a><span class="ex">12</span></span>
<span id="cb9-36"><a href="#cb9-36" aria-hidden="true" tabindex="-1"></a><span class="ex">184601</span></span>
<span id="cb9-37"><a href="#cb9-37" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 0.29s user 0.00s system 99% cpu 0.294 total</span>
<span id="cb9-38"><a href="#cb9-38" aria-hidden="true" tabindex="-1"></a><span class="ex">13</span></span>
<span id="cb9-39"><a href="#cb9-39" aria-hidden="true" tabindex="-1"></a><span class="ex">1031969</span></span>
<span id="cb9-40"><a href="#cb9-40" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 1.78s user 0.00s system 99% cpu 1.794 total</span>
<span id="cb9-41"><a href="#cb9-41" aria-hidden="true" tabindex="-1"></a><span class="ex">14</span></span>
<span id="cb9-42"><a href="#cb9-42" aria-hidden="true" tabindex="-1"></a><span class="ex">5483941</span></span>
<span id="cb9-43"><a href="#cb9-43" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 11.26s user 0.02s system 99% cpu 11.311 total</span>
<span id="cb9-44"><a href="#cb9-44" aria-hidden="true" tabindex="-1"></a><span class="ex">15</span></span>
<span id="cb9-45"><a href="#cb9-45" aria-hidden="true" tabindex="-1"></a><span class="ex">36466945</span></span>
<span id="cb9-46"><a href="#cb9-46" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 79.20s user 0.15s system 99% cpu 1:19.72 total</span>
<span id="cb9-47"><a href="#cb9-47" aria-hidden="true" tabindex="-1"></a><span class="ex">16</span></span>
<span id="cb9-48"><a href="#cb9-48" aria-hidden="true" tabindex="-1"></a><span class="ex">251132705</span></span>
<span id="cb9-49"><a href="#cb9-49" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 592.89s user 0.77s system 99% cpu 9:55.34 total</span>
<span id="cb9-50"><a href="#cb9-50" aria-hidden="true" tabindex="-1"></a><span class="ex">17</span></span>
<span id="cb9-51"><a href="#cb9-51" aria-hidden="true" tabindex="-1"></a><span class="ex">1724671873</span></span>
<span id="cb9-52"><a href="#cb9-52" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 4535.71s user 5.25s system 99% cpu 1:15:49.76 total</span>
<span id="cb9-53"><a href="#cb9-53" aria-hidden="true" tabindex="-1"></a><span class="ex">18</span></span>
<span id="cb9-54"><a href="#cb9-54" aria-hidden="true" tabindex="-1"></a><span class="ex">12655721857</span></span>
<span id="cb9-55"><a href="#cb9-55" aria-hidden="true" tabindex="-1"></a><span class="ex">./baruch</span> 37496.97s user 58.50s system 99% cpu 10:27:48.29 total</span></code></pre></div>
<h2 id="jaw">1990 jaw</h2>
<h3 id="status-known-bug---please-help-us-fix-4">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1990jawjaw.c">Source code: <a
href="1990/jaw/jaw.c">1990/jaw/jaw.c</a></h3>
<h3 id="information-1990jawreadme.md">Information: <a
href="1990/jaw/README.md">1990/jaw/README.md</a></h3>
<p><a href="https://www.ioccc.org/authors.html#Cody_Boone_Ferguson">Cody
Boone Ferguson</a> fixed some issues in this program and <a
href="https://www.ioccc.org/authors.html#Yusuke_Endoh">Yusuke Endoh</a>
provided the <code>btoa</code> script but it appears there is a bug in
this entry. The judges wrote that to test the entry one can do:</p>
<div class="sourceCode" id="cb10"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;Quartz glyph jocks vend, fix, BMW.&quot;</span> <span class="kw">|</span> <span class="ex">compress</span> <span class="kw">|</span> <span class="ex">./btoa</span> <span class="kw">|</span> <span class="ex">./jaw</span></span></code></pre></div>
<p>which should apply the identity transformation to a minimal
holoalphabetic sentence.</p>
<p>But doing this shows instead:</p>
<div class="sourceCode" id="cb11"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;Quartz glyph jocks vend, fix, BMW.&quot;</span> <span class="kw">|</span> <span class="ex">compress</span> <span class="kw">|</span> <span class="ex">./btoa</span> <span class="kw">|</span> <span class="ex">./jaw</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="ex">a얖?</span><span class="er">)</span><span class="ex">V...?????777??hC??h??-?</span> <span class="er">)</span><span class="ex">SSSSXXX????r?L=???*?-???ppp,,,?R</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="ex">?j</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="ex">111-</span><span class="er">)))</span><span class="ex">?</span> <span class="st">&#39;..F@E</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a><span class="st"> ???b111?</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a><span class="st">..F..F.?n,,,,,L@E$</span></span></code></pre></div>
<p>Notice how there’s no newline at the end: that final <code>$</code>
is the prompt.</p>
<p>If one does, however:</p>
<div class="sourceCode" id="cb12"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;Quartz glyph jocks vend, fix, BMW.&quot;</span> <span class="kw">|</span> <span class="ex">compress</span> <span class="kw">|</span> <span class="ex">./btoa</span> <span class="kw">|</span> <span class="ex">./jaw</span> <span class="kw">|</span> <span class="ex">./jaw</span></span></code></pre></div>
<p>they will get just</p>
<pre><code>oops</code></pre>
<p>which seems to be an error message (one of the fixes was to make it
not use <code>perror(3)</code> - this fixed something else though it’s
no longer known what).</p>
<p>The script <a href="/1990/jaw/shark.sh">shark.sh</a> has some issues
too in that due to path not having <code>.</code> (this and maybe some
other things were fixed) and <code>tar</code> not wanting to accept
reading from <code>stdin</code> (this in particular) even with the right
options used, seemingly, it has to write to disk the tarball which seems
to defeat the purpose. This would ideally be fixed.</p>
<h2 id="tbr">1990 tbr</h2>
<h3 id="status-inabiaf---please-do-not-fix-6">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1990tbrtbr.c">Source code: <a
href="1990/tbr/tbr.c">1990/tbr/tbr.c</a></h3>
<h3 id="information-1990tbrreadme.md">Information: <a
href="1990/tbr/README.md">1990/tbr/README.md</a></h3>
<p>The authors provided a list of features in the <a
href="/1990/tbr/README.md#bugs">BUGS</a> section in their remarks.</p>
<h2 id="theorem">1990 theorem</h2>
<h3 id="status-inabiaf---please-do-not-fix-7">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1990theoremtheorem.c">Source code: <a
href="1990/theorem/theorem.c">1990/theorem/theorem.c</a></h3>
<h3 id="information-1990theoremreadme.md">Information: <a
href="1990/theorem/README.md">1990/theorem/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed many bugs that prevented this from working properly (including
segfaults) but one thing to note is that if you pass two zeroes to
<code>theorem_bkp</code> or <code>fibonacci</code> the program will
enter an infinite loop, printing 0 over and over again; another
condition where this occurred was fixed but this one should not be
fixed. Thank you.</p>
<h1 id="section-7">1991</h1>
<h2 id="buzzard">1991 buzzard</h2>
<h3 id="status-inabiaf---please-do-not-fix-8">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1991buzzardbuzzard.c">Source code: <a
href="1991/buzzard/buzzard.c">1991/buzzard/buzzard.c</a></h3>
<h3 id="information-1991buzzardreadme.md">Information: <a
href="1991/buzzard/README.md">1991/buzzard/README.md</a></h3>
<p>If the maze file cannot be opened, either because the path specified
does not exist or because the default (whatever the source file was at
compilation time) file does not exist in the directory, this program
will very likely crash.</p>
<p>This is a feature, not a bug.</p>
<h2 id="westley-1">1991 westley</h2>
<h3 id="status-inabiaf---please-do-not-fix-9">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1991westleywestley.c">Source code: <a
href="1991/westley/westley.c">1991/westley/westley.c</a></h3>
<h3 id="information-1991westleyreadme.md">Information: <a
href="1991/westley/README.md">1991/westley/README.md</a></h3>
<p>There is a very simple way to always win. The program doesn’t catch
you and as someone called Cody’s late grandmother said to him: ‘it’s not
cheating unless you’re caught’. :-)</p>
<p>Please don’t try and fix it as it’s not a bug and was actually
documented as a possibility. Can you find out how? There’s also a way to
make it so that even when you’re cheating it ends up winning! Can you
figure that out as well?</p>
<h1 id="section-8">1992</h1>
<h2 id="adrian">1992 adrian</h2>
<h3 id="status-inabiaf---please-do-not-fix-10">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1992adrianadrian.c">Source code: <a
href="1992/adrian/adrian.c">1992/adrian/adrian.c</a></h3>
<h3 id="information-1992adrianreadme.md">Information: <a
href="1992/adrian/README.md">1992/adrian/README.md</a></h3>
<p>The author stated that if the file cannot be opened then it will
print a system error but this is not the case unless it’s showing a
fault. However this was instead fixed by Cody as part of another problem
that was detected so that the program just exits 1 if the file cannot be
opened.</p>
<p>Also, if <em>some</em> of the programs are not given an arg they will
very likely crash or do something funny. For instance
<code>adsleep</code> and <code>adbasename</code>. This is very simple to
fix but the author explicitly noted that this will segfault and it is
that that is the error message.</p>
<p>Another thing is that the code:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>printf<span class="op">((</span>W<span class="op">,</span>Y<span class="op">));</span></span></code></pre></div>
<p>appears to be wrong because <code>W</code> is a <code>FILE *</code>
and <code>Y</code> is a <code>char[]</code> but if one changes it to use
<code>fprintf()</code> on the file (which, incidentally, is opened in
read only mode which is another reason) with the <code>%s</code>
specifier it will make <code>adhead</code> not work: it’ll print nothing
at all! So this code should not be changed either even if it appears to
be wrong. Notice too a curious thing: if you did change it to fprintf,
even if you have the right number of args, you’d have to remove the
outer <code>()</code> pair.</p>
<h2 id="albert">1992 albert</h2>
<h3 id="status-known-bug---please-help-us-fix-5">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1992albertalbert.c">Source code: <a
href="1992/albert/albert.c">1992/albert/albert.c</a></h3>
<h3 id="information-1992albertreadme.md">Information: <a
href="1992/albert/README.md">1992/albert/README.md</a></h3>
<p>Leo Broukhis, before he was an IOCCC judge, sent the IOCCC judges an
email:</p>
<pre><code>From: leo _at_ zycad -dot- com (Leo Broukhis)
Date: Tue, 30 Jan 96 17:37:51 PST
To: judges _at_ toad -dot- com
Subject: IOCCC 1992 - a bug
Dear Judges,
albert.c (even in its fixed form) still has a bug. Although I don&#39;t
remember the number that exposed the bug (afair, resulting in coredump)
in albert.orig.c that has been fixed in albert.c,
I&#39;ve found a number exposing another bug: 10000000001 (that&#39;s 9 0&#39;s).
Both albert and albert.orig loop without printing anything, although
the first factor is 101 and is usually found in an instant.</code></pre>
<p>A quick debugging session from Cody suggests that the problem with
this value is that:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span> ppp<span class="op">-&gt;</span>qq<span class="op">!=</span><span class="dv">48</span> <span class="op">)</span> <span class="cf">return</span><span class="op">;</span></span></code></pre></div>
<p>is never reached because the value is never 48 (it is in other cases
but not for the example input). It varies in value at this point.
Observe that the next lines of code are:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="cf">while</span> <span class="op">(</span> ppp<span class="op">-&gt;</span>qq<span class="op">==</span><span class="dv">48</span> <span class="op">)</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;</span><span class="sc">%ld\n</span><span class="st">&quot;</span><span class="op">,</span>qqq<span class="op">-</span><span class="dv">45</span><span class="op">);</span></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span>pp <span class="op">=</span> ppp<span class="op">;</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true" tabindex="-1"></a> ppp <span class="op">=</span> ppp<span class="op">-&gt;</span>p<span class="op">;</span></span>
<span id="cb17-6"><a href="#cb17-6" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>so it is expected that that value is 48, before printing the numbers,
but if it’s not it should not proceed at all, not even to go past that
loop. In other words that loop should always be entered for at least one
iteration. The check for the <code>!= 48</code> is also required.</p>
<p>Perhaps more useful to know is that at this point in the code the
code:</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(((((</span> <span class="op">!(</span>aa<span class="op">=</span>setjmp<span class="op">(</span>ppp<span class="op">-&gt;</span>ppp<span class="op">))||</span>aa<span class="op">==</span>aaaaaa <span class="op">)))))</span></span></code></pre></div>
<p>appears to be entered because of the return value of
<code>setjmp()</code>, not the other condition.</p>
<p>The alt version does fix the problem but it is not obfuscated and not
like the entry itself. Can you fix the actual entry? You are welcome to
try and do so.</p>
<h2 id="gson">1992 gson</h2>
<h3 id="status-uses-gets---change-to-fgets-if-possible-1">STATUS: uses
gets() - change to fgets() if possible</h3>
<h3 id="source-code-1992gsongson.c">Source code: <a
href="1992/gson/gson.c">1992/gson/gson.c</a></h3>
<h3 id="information-1992gsonreadme.md1992gsonreadme.md">Information:
[1992/gson/README.md])(1992/gson/README.md)</h3>
<p>Cody changed it so that the buffer size is <code>ARG_MAX+1</code> to
try and get past the problem of <code>gets()</code> being used in a more
complex way.</p>
<p>It would be ideal if it were to use <code>fgets()</code> though. This
will probably be looked at later but you’re welcome to try and fix this
too! A tip on how <code>gets()</code> is being used from Cody:</p>
<p>Previously it had a buffer size of 256 which could easily overflow.
In this entry <code>gets(3)</code> is used in a more complicated way:
first <code>m</code> is set to <code>*++p</code> in a for loop where
<code>p</code> is argv. Later <code>m</code> is set to point to
<code>h</code> which was of size 256. <code>gets(3)</code> is called as
<code>m = gets(m)</code>) but trying to change it to use
<code>fgets(3)</code> proved more a problem. Since the input must come
from the command line Cody changed the buffer size to
<code>ARG_MAX+1</code> which should be enough (again theoretically)
especially since the command expects redirecting a dictionary file as
part of the command line. This also makes it possible for longer strings
to be read (in case the <code>gets(3)</code> was not used in a
loop).</p>
<h2 id="kivinen">1992 kivinen</h2>
<h3 id="status-known-bug---please-help-us-fix-6">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1992kivinenkivinen.c">Source code: <a
href="1992/kivinen/kivinen.c">1992/kivinen/kivinen.c</a></h3>
<h3 id="information-1992kivinenreadme.md">Information: <a
href="1992/kivinen/README.md">1992/kivinen/README.md</a></h3>
<p>When you start the program everything starts to move over to the
right side and then ends. <a href="/authors.html#Yusuke_Endoh">Yusuke
Endoh</a> pointed out that if you click the mouse it takes it back
towards the centre.</p>
<p>If you want to try and fix this (mis)feature, you are welcome to
try.</p>
<h2 id="lush">1992 lush</h2>
<h3
id="status-doesnt-work-with-some-compilers---please-provide-alternative-code-or-fix-for-more-compilers-1">STATUS:
doesn’t work with some compilers - please provide alternative code or
fix for more compilers</h3>
<h3 id="source-code-1992lushlush.c">Source code: <a
href="1992/lush/lush.c">1992/lush/lush.c</a></h3>
<h3 id="information-1992lushreadme.md">Information: <a
href="1992/lush/README.md">1992/lush/README.md</a></h3>
<p>We used a patch from <a href="/authors.html#Yusuke_Endoh">Yusuke
Endoh</a> to get this to work but it only works with gcc. Cody removed
the warnings of <code>gets()</code> and provided a script to run the
entry properly.</p>
<p>Unfortunately due to the way the entry works and the fact that other
compilers like clang have different warnings and errors this simply does
not work with them.</p>
<p>Some tips from Cody:</p>
<p>This entry relies on specific compiler warnings. With gcc it will
look something like:</p>
<pre><code>[...]
lush.c: In function &#39;main&#39;:
lush.c:40: warning: &quot;f&quot; redefined
40 | main
|
lush.c:1: note: this is the location of the previous definition
1 | #define gets(_) fgets((_),999,stdin)
|
lush.c:42: warning: &quot;f&quot; redefined
42 | #define f 001:
|
lush.c:40: note: this is the location of the previous definition
40 | main
|
lush.c:44: warning: &quot;f&quot; redefined
44 | #define f 100:
|
lush.c:42: note: this is the location of the previous definition
42 | #define f 001:
|
lush.c:45: warning: &quot;f&quot; redefined
45 | _[i--
|
lush.c:44: note: this is the location of the previous definition
44 | #define f 100:
|
lush.c:46: warning: &quot;f&quot; redefined
46 | #define f 126:
|
lush.c:45: note: this is the location of the previous definition
45 | _[i--
|</code></pre>
<p>Now one can use <code>sed</code> to get the <code>warning:</code>
line correct but there is more to it than that. For instance this is
what it looks like with clang:</p>
<pre><code>lush.c:40:9: warning: &#39;f&#39; macro redefined [-Wmacro-redefined]
#define f 001:
^
lush.c:1:9: note: previous definition is here
#define f 000:
^
lush.c:42:9: warning: &#39;f&#39; macro redefined [-Wmacro-redefined]
#define f 100:
^
lush.c:40:9: note: previous definition is here
#define f 001:
^</code></pre>
<p>As you might see the part under the <code>warning:</code> line is
different.</p>
<p>The entry is supposed to show warnings and then print:</p>
<pre><code>Hello World.</code></pre>
<p>Can you help us?</p>
<h2 id="vern">1992 vern</h2>
<h3 id="status-inabiaf---please-do-not-fix-11">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1992vernvern.c">Source code: <a
href="1992/vern/vern.c">1992/vern/vern.c</a></h3>
<h3 id="information-1992vernreadme.md">Information: <a
href="1992/vern/README.md">1992/vern/README.md</a></h3>
<p>When your own checkmate is imminent it prints <code>"Har har"</code>
but does not exit so it can ‘rub your nose in defeat’, as the author
puts it. You will have to exit it yourself through ctrl-c or killing it
in some other fashion.</p>
<h2 id="westley-2">1992 westley</h2>
<h3 id="status-inabiaf---please-do-not-fix-12">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1992westleywestley.c">Source code: <a
href="1992/westley/westley.c">1992/westley/westley.c</a></h3>
<h3 id="information-1992westleyreadme.md">Information: <a
href="1992/westley/README.md">1992/westley/README.md</a></h3>
<p>Cody improved the usability of this program by making it so that as
long as the terminal columns is &gt;= 80 it will display properly,
rather than having to wrap at 80 columns. However due to the nature of
the program if the terminal is &lt; 80 in column width it will not
display right. To see the number of columns in your terminal try:</p>
<div class="sourceCode" id="cb22"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="va">$COLUMNS</span></span></code></pre></div>
<h3 id="status-known-bug---please-help-us-fix-7">STATUS: known bug -
please help us fix</h3>
<p>The author suggested that the alternate version, which Cody added
(but fixed for modern systems), should print</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>main<span class="op">(</span>l<span class="op">,</span>a<span class="op">,</span>n<span class="op">,</span>d<span class="op">)...</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a><span class="op">[</span>A M E R I C A<span class="op">]...</span></span></code></pre></div>
<p>…going down the left edge if your terminal auto-wraps at 80
characters.</p>
<p>This however does not seem to work. It does not appear to be because
of the fix for modern systems as it doesn’t work for gcc either, even
before any changes. This might be a misunderstanding or it might be that
having 80 columns (resized) does not count (though the output before the
fix of the 80 column requirement showed was correct when at 80-columns
so it seems like this could be a bug if not a misunderstanding).</p>
<h1 id="section-9">1993</h1>
<h3 id="status-inabiaf---please-do-not-fix-13">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1993antant.c">Source code: <a
href="1993/ant/ant.c">1993/ant/ant.c</a></h3>
<h3 id="information-1993antreadme.md">Information: <a
href="1993/ant/README.md">1993/ant/README.md</a></h3>
<p>The author stated that:</p>
<pre><code>The expression `(a*)*` compiles but loops forever.
There is no check for trailing backslash (`\`) in the pattern.
There is no check for unbalanced brackets. Omitting a closing bracket
will generate a &quot;Pattern too long&quot; error, which is not the real error.</code></pre>
<h3 id="status-missing-file---please-provide-it">STATUS: missing file -
please provide it</h3>
<p>The author wrote in the documentation file <a
href="1993/ant/ant.txt">ant.txt</a> that there is a version of the code
that is not obfuscated. This file, <code>agag.c</code> does not exist in
the archive. Do you have it? Please provide it!</p>
<h3 id="status-known-bug---please-help-us-fix-8">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1993cmillscmills.c">Source code: <a
href="1993/cmills/cmills.c">1993/cmills/cmills.c</a></h3>
<h3 id="information-1993cmillsreadme.md">Information: <a
href="1993/cmills/README.md">1993/cmills/README.md</a></h3>
<p>In multiple platforms, both macOS and also linux (in particular a
RHEL 9.3 system), this entry just shows a blank screen.</p>
<p>Can you fix it? We welcome your help.</p>
<h2 id="lmfjyh">1993 lmfjyh</h2>
<h3 id="status-inabiaf---please-do-not-fix-14">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1993lmfjyhlmfjyh.c">Source code: <a
href="1993/lmfjyh/lmfjyh.c">1993/lmfjyh/lmfjyh.c</a></h3>
<h3 id="information-1993lmfjyhreadme.md">Information: <a
href="1993/lmfjyh/README.md">1993/lmfjyh/README.md</a></h3>
<p>This entry relied on a bug in gcc that was fixed with gcc version
2.3.3. This cannot be fixed for modern systems as the bug is long
gone.</p>
<p>An alternate version that will work for modern systems, however, does
exist. See the README.md file for details.</p>
<h3 id="status-inabiaf---please-do-not-fix-15">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1993rincerince.c">Source code: <a
href="1993/rince/rince.c">1993/rince/rince.c</a></h3>
<h3 id="information-1993rincereadme.md">Information: <a
href="1993/rince/README.md">1993/rince/README.md</a></h3>
<p>Although the code checks if the file can be opened or not, badly
formatted files will cause problems. No other checks are performed
either.</p>
<p>There is no end of game checking method so you will have to quit the
game through ctrl-c or such.</p>
<h3 id="status-inabiaf---please-do-not-fix-16">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1993schnitzischnitzi.c">Source code: <a
href="1993/schnitzi/schnitzi.c">1993/schnitzi/schnitzi.c</a></h3>
<h3 id="information-1993schnitzireadme.md">Information: <a
href="1993/schnitzi/README.md">1993/schnitzi/README.md</a></h3>
<p>If the file cannot be opened it will very likely segfault. This
should not be fixed except for an exercise to yourself, should you wish
to try.</p>
<p>This program uses <code>system(3)</code> so if you provide invalid
characters in the question you might cause an error. For instance don’t
do this:</p>
<div class="sourceCode" id="cb25"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./schnitzi schnitzi.info</span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="ex">This</span> program answers questions about paragraphs</span>
<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a><span class="ex">of</span> text posed to it in English. It is written</span>
<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a><span class="er">in</span> <span class="ex">C.</span> Mark Schnitzius is the author of this</span>
<span id="cb25-5"><a href="#cb25-5" aria-hidden="true" tabindex="-1"></a><span class="ex">program.</span></span>
<span id="cb25-6"><a href="#cb25-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb25-7"><a href="#cb25-7" aria-hidden="true" tabindex="-1"></a><span class="ex">The</span> Loch Ness monster has been captured. Elvis</span>
<span id="cb25-8"><a href="#cb25-8" aria-hidden="true" tabindex="-1"></a><span class="ex">is</span> alive. Hostler was a woman. The NASA moon</span>
<span id="cb25-9"><a href="#cb25-9" aria-hidden="true" tabindex="-1"></a><span class="ex">landings</span> were clearly faked.</span>
<span id="cb25-10"><a href="#cb25-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb25-11"><a href="#cb25-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb25-12"><a href="#cb25-12" aria-hidden="true" tabindex="-1"></a><span class="ex">?</span> What is foo<span class="st">&#39;?</span></span></code></pre></div>
<p>because doing so will result in something like:</p>
<pre><code>sh: -c: line 0: unexpected EOF while looking for matching `&#39;&#39;
sh: -c: line 1: syntax error: unexpected end of file</code></pre>
<p>with the program terminating. Other characters will also cause this
problem.</p>
<p>Of course if you do something like:</p>
<pre><code>What is &#39;foo&#39;?</code></pre>
<p>it will work fine.</p>
<h3 id="status-inabiaf---please-do-not-fix-17">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1993vanbvanb.c">Source code: <a
href="1993/vanb/vanb.c">1993/vanb/vanb.c</a></h3>
<h3 id="information-1993vanbreadme.md">Information: <a
href="1993/vanb/README.md">1993/vanb/README.md</a></h3>
<p>No spaces are allowed in the expression.</p>
<p>The program does no error checking so erroneous expressions will
produce spurious results.</p>
<p>The unary <code>-</code> is an operator so decimal <code>-46</code>
should be entered as <code>-d46</code> and not <code>d-46</code>.</p>
<h1 id="section-10">1994</h1>
<h2 id="dodsond2">1994 dodsond2</h2>
<h3 id="status-inabiaf---please-do-not-fix-18">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1994dodsond2dodsond2.c">Source code: <a
href="1994/dodsond2/dodsond2.c">1994/dodsond2/dodsond2.c</a></h3>
<h3 id="information-1994dodsond2readme.md">Information: <a
href="1994/dodsond2/README.md">1994/dodsond2/README.md</a></h3>
<p>When you initiate shooting via the <code>s</code> command you
immediately lose an arrow <em>before you choose where to shoot</em>.</p>
<p>When you shoot it will move you to that room so if you end up
shooting into a pit room you will end up dying even though you didn’t
explicitly move there.</p>
<h2 id="ldb">1994 ldb</h2>
<h3 id="status-inabiaf---please-do-not-fix-19">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1994ldbldb.c">Source code: <a
href="1994/ldb/ldb.c">1994/ldb/ldb.c</a></h3>
<h3 id="information-1994ldbreadme.md">Information: <a
href="1994/ldb/README.md">1994/ldb/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed this to compile with modern systems (see the <a
href="/thanks-for-help.md">thanks</a> file for what had to change) but
the entry also used <code>gets()</code> which in some systems would
print out a warning along with the output of the program. Naturally it
could also overflow long lines. Cody changed it to <code>fgets()</code>
to prevent the display problem but this introduces another problem
namely that newlines can be printed if the line length &lt; 231.</p>
<p>This seems like a worthy compromise to not have messed up output and
although it would be ideal for it to never print a newline unless that’s
the line itself it might be tampering too much with the entry as it’s
not a real problem and as a one liner it’s already quite long.</p>
<h2 id="schnitzi">1994 schnitzi</h2>
<h3 id="status-uses-gets---change-to-fgets-if-possible-2">STATUS: uses
gets() - change to fgets() if possible</h3>
<h3 id="source-code-1994schnitzischnitzi.c">Source code: <a
href="1994/schnitzi/schnitzi.c">1994/schnitzi/schnitzi.c</a></h3>
<h3 id="information-1994schnitzireadme.md">Information: <a
href="1994/schnitzi/README.md">1994/schnitzi/README.md</a></h3>
<p>NOTE: the generated code of all versions, when fed its own source,
will differ even when it works. See the author’s remarks in the
README.md for details. Increasing the buffer size and having it, when
fed its own source code, generate code that will compile with the same
buffer size is difficult: it just uses the original size. Cody explains
this further down.</p>
<p>Getting it to use <code>fgets()</code> is even harder as when fed its
own code it will generate code that cannot even compile let alone use
<code>fgets(3)</code>.</p>
<p>In both cases, changing the buffer size and changing it to use
<code>fgets(3)</code>, will cause compilation errors without other
adjustments.</p>
<p>See the below magic for details. Along with the author’s remarks in
the README.md file it might prove possible to get it to use
<code>fgets(3)</code>. Cody, writing this on 02 November 2023, only just
noticed the author’s remarks and will later on look at this if nobody
takes up the challenge. More important work like getting to a place that
the next contest can run must be done first.</p>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
explains the magic of how this entry works, which will be necessary if
this entry is to be fixed, below.</p>
<p>You might wish to run the command:</p>
<div class="sourceCode" id="cb28"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> diff_orig_prog</span></code></pre></div>
<p>to see what had to change for the buffer size, when looking at the
below. Furthermore you will want to look at:</p>
<div class="sourceCode" id="cb29"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="fu">diff</span> schnitzi.alt.c schnitzi.alt2.c</span></code></pre></div>
<p>as the <code>fgets()</code> version can compile it just can’t
generate compilable code (let alone using <code>fgets()</code>) when fed
itself (to reiterate, just changing the call to <code>fgets(3)</code>
does not mean it can compile and there’s a further problem in that
<code>fgets(3)</code> retains the newline whereas <code>gets(3)</code>
does not). Nevertheless looking at these commands will be of help to
understand how it works.</p>
<p>For the alternate versions the other functionality is unaffected.</p>
<h3 id="the-magic-of-1994schnitzi-and-how-it-flips-text">The magic of <a
href="1994/schnitzi/schnitzi.c">1994/schnitzi</a> and how it flips
text</h3>
<p>The problem is getting the generated code to use <code>fgets()</code>
(once it even compiles which was easy to do) and also have the updated
buffer size be the same (which was easy to do too at least in the
original version). The generated output, when changed to
<code>fgets()</code> failed to compile and it also used
<code>gets(3)</code> and these are the bugs here.</p>
<p>The buffer size, when using <code>gets()</code> is still the same but
as noted above the original code has had a buffer size increase.</p>
<p>The real problem is with formatting the code. Take a look at the
interesting comment as well as the <code>int r=0,x,y=0</code> at the top
of the file. If you look at each column go down that column you can see
how it spells out the code! For instance the first column looks
like:</p>
<pre><code>i
n
c
l
u
d
e
&lt;
s
t
d
i
o
.
h
&gt;</code></pre>
<p>If you join the lines you end up with:</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;stdio.h&gt;</span></span></code></pre></div>
<p>If you look at column 25 which is the end of the word ‘mh111’ and you
go down to the next row you’ll see a 0 and if you go one row down
another 0. This is the buffer size, 100, for <code>u</code>! The column
to the left is the same for the <code>t</code> variable.</p>
<p>Thus it seems that in order to get the generated output correct one
needs to provide the correct input in comments or possibly by
rearranging some of the code (this was actually required to make the
generated code compile at all when changing the buffer size, see
below).</p>
<h3 id="important-points">Important points:</h3>
<p>Getting this entry to use <code>fgets()</code> is easy but the
problem is you’re supposed to be able to feed the source to the program
and the output of that will be compilable. It however will create
compiler errors. So it’s not just changing the code to get it to use
fgets()! I (Cody) already did this before I noticed the other part which
is why I rolled that part back. I did increase the buffer size but that
only works on the original source.</p>
<p>To say just how sensitive this entry is: even a space, lack of space
or a character, wrong character, lack of character or character in the
wrong place can cause a compilation error! Make sure that the output
of:</p>
<div class="sourceCode" id="cb32"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> <span class="op">&lt;</span> schnitzi.c</span></code></pre></div>
<p>can be compiled and the output of that new program when fed itself
can also be compiled!</p>
<h2 id="shapiro">1994 shapiro</h2>
<h3 id="status-inabiaf---please-do-not-fix-20">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1994shapiroshapiro.c">Source code: <a
href="1994/shapiro/shapiro.c">1994/shapiro/shapiro.c</a></h3>
<h3 id="information-1994shapiroreadme.md">Information: <a
href="1994/shapiro/README.md">1994/shapiro/README.md</a></h3>
<p>This program will likely crash if the source code file (by the name
of the file that’s compiled) cannot be opened in the directory it is run
from.</p>
<h3 id="status-missing-file---please-provide-it-1">STATUS: missing file
- please provide it</h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
noted that the README.md file refers to an alternative version of the
code that is not obfuscated but it is missing from the entry directory
and the archive. Do you have this file?</p>
<p>We would be grateful if you could provide it to us. If you can
provide this file you might consider removing this entry from this file
as well but if not we’ll take care of it.</p>
<h3
id="important-reminder-and-a-note-about-the--1-value-check-for-getc">Important
reminder and a note about the <code>-1</code> value check for
<code>getc()</code>:</h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed the code to not use <code>-1</code> for the return value of
<code>getc()</code>; this is important because <code>EOF</code> is
<strong>NOT</strong> guaranteed to be <code>-1</code> but rather any
negative value. On systems where <code>EOF != -1</code> the program
would enter an infinite loop until the program crashed, by chance reads
a <code>-1</code> or was killed (it is for this same reason that one
should not use <code>EOF</code> for the <code>getopt()</code> functions
as they return <code>-1</code> when all options are parsed (for details
on the definition of <code>EOF</code> see
<code>7.21 Input/output&lt;stdio.h&gt;</code> subsection 1 of the
standard)).</p>
<p>An interesting problem occurred where changing the <code>-1</code> to
<code>EOF</code> caused both
<code>warning: illegal character encoding in string literal</code> and
<code>error: source file is not valid UTF-8</code>. But since
<code>EOF</code> is simply an int &lt; 0 and making the loop condition
check that the return value is &gt;= 0 does not cause a compilation
error and it functions correctly it will address the systems where
<code>EOF != -1</code> just as if it checked for
<code>!= EOF</code>.</p>
<p>Since it works there is no need to fix this except for a challenge to
yourself.</p>
<h2 id="tvr">1994 tvr</h2>
<h3 id="status-known-bug---please-help-us-fix-9">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1994tvrtvr.c">Source code: <a
href="1994/tvr/tvr.c">1994/tvr/tvr.c</a></h3>
<h3 id="information-1994tvrreadme.md">Information: <a
href="1994/tvr/README.md">1994/tvr/README.md</a></h3>
<p>The judges said the following in their remarks:</p>
<pre><code>The fractally minded may be able to detect that mode 0 does not calculate
Mandelbrot/Julian sets correctly. Can you find the bug? Better still, can you
fix it without breaking something else?</code></pre>
<p>You are welcome to try and fix it and open a pull request, providing
that it doesn’t break something else.</p>
<h1 id="section-11">1995</h1>
<h2 id="cdua">1995 cdua</h2>
<h3 id="status-inabiaf---please-do-not-fix-21">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1995cduacdua.c">Source code: <a
href="1995/cdua/cdua.c">1995/cdua/cdua.c</a></h3>
<h3 id="information-1995cduareadme.md">Information: <a
href="1995/cdua/README.md">1995/cdua/README.md</a></h3>
<p>This did not originally compile under macOS and after it did compile
under macOS, it crashed. <a
href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a> fixed
these problems.</p>
<p>It should be noted however that there is a condition where the
program will prompt you to press return again. This was thought to be a
bug but looking at the code it can clearly be seen that if
<code>g - a</code> is 0 then the message is supposed to be printed again
and one is supposed to press a key as at that point it calls
<code>getchar()</code> via the pointer <code>m</code>. So this is a
feature not a bug.</p>
<h2 id="leo">1995 leo</h2>
<h3 id="status-known-bug---please-help-us-fix-10">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-1995leoleo.c">Source code: <a
href="1995/leo/leo.c">1995/leo/leo.c</a></h3>
<h3 id="information-1995leoreadme.md">Information: <a
href="1995/leo/README.md">1995/leo/README.md</a></h3>
<p>The judges suggested that the following commands should result in
output:</p>
<div class="sourceCode" id="cb34"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./leo</span> 1 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span>
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb34-3"><a href="#cb34-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./leo</span> 37 80 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span></code></pre></div>
<p>The first one can work if one does instead:</p>
<div class="sourceCode" id="cb35"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;&quot;</span> <span class="kw">|</span> <span class="ex">./leo</span> 1 <span class="op">&gt;</span> foo.ps</span>
<span id="cb35-2"><a href="#cb35-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gs</span> foo.ps</span></code></pre></div>
<p>but it is supposed to work in the pipeline as is. The second one does
not appear to work at all even if one redirects to a file (like the
workaround for the first) as it appears to just block.</p>
<p>It is not known if this is platform specific but this was observed in
macOS and it would be good if it was fixed.</p>
<h2 id="savastio">1995 savastio</h2>
<h3 id="status-inabiaf---please-do-not-fix-22">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1995savastiosavastio.c">Source code: <a
href="1995/savastio/savastio.c">1995/savastio/savastio.c</a></h3>
<h3 id="information-1995savastioreadme.md">Information: <a
href="1995/savastio/README.md">1995/savastio/README.md</a></h3>
<p>This program expects a POSITIVE number. If you specify a negative
number it will not show any output, stuck in a loop.</p>
<h2 id="vanschnitz">1995 vanschnitz</h2>
<h3 id="status-missing-file---please-provide-it-2">STATUS: missing file
- please provide it</h3>
<h3 id="source-code-1995vanschnitzvanschnitz.c">Source code: <a
href="1995/vanschnitz/vanschnitz.c">1995/vanschnitz/vanschnitz.c</a></h3>
<h3 id="information-1995vanschnitzreadme.md">Information: <a
href="1995/vanschnitz/README.md">1995/vanschnitz/README.md</a></h3>
<p>The authors stated that they included a version that allows people
with just K&amp;R compilers to use the program but this file is missing.
Can you provide it?</p>
<p>We would appreciate anyone who has it or even just knows the name!
Thank you.</p>
<h1 id="section-12">1996</h1>
<h2 id="gandalf">1996 gandalf</h2>
<h3 id="status-missing-or-dead-link---please-provide-them-1">STATUS:
missing or dead link - please provide them</h3>
<h3 id="source-code-1996gandalfgandalf.c">Source code: <a
href="1996/gandalf/gandalf.c">1996/gandalf/gandalf.c</a></h3>
<h3 id="information-1996gandalfreadme.md">Information: <a
href="1996/gandalf/README.md">1996/gandalf/README.md</a></h3>
<p>The link was http://www.tc3.co.uk/~gandalf/G.HTML but this no longer
exists as it was instead requiring a login / password.</p>
<p>Do you have an updated link? We welcome your help!</p>
<h2 id="huffman">1996 huffman</h2>
<h3 id="status-uses-gets---change-to-fgets-if-possible-3">STATUS: uses
gets() - change to fgets() if possible</h3>
<h3 id="source-code-1996huffmanhuffman.c">Source code: <a
href="1996/huffman/huffman.c">1996/huffman/huffman.c</a></h3>
<h3 id="information-1996huffmanreadme.md">Information: <a
href="1996/huffman/README.md">1996/huffman/README.md</a></h3>
<p>The changing to using <code>fgets(3)</code> in this entry is a bit
more complicated. It can almost be done except that some of the output
of the <a href="1996/huffman/try.sh">try.sh</a> is wrong, especially the
last one.</p>
<p>This diff almost does it but not quite:</p>
<div class="sourceCode" id="cb36"><pre
class="sourceCode diff"><code class="sourceCode diff"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="kw">diff --git i/1996/huffman/huffman.c w/1996/huffman/huffman.c</span></span>
<span id="cb36-2"><a href="#cb36-2" aria-hidden="true" tabindex="-1"></a>index a5745bc7f4fa28b834c004f4cf19633e40ad9165..5e5e5334f33f9dbd95c70eddece3189d9bcff5e9 100644</span>
<span id="cb36-3"><a href="#cb36-3" aria-hidden="true" tabindex="-1"></a><span class="dt">--- i/1996/huffman/huffman.c</span></span>
<span id="cb36-4"><a href="#cb36-4" aria-hidden="true" tabindex="-1"></a><span class="dt">+++ w/1996/huffman/huffman.c</span></span>
<span id="cb36-5"><a href="#cb36-5" aria-hidden="true" tabindex="-1"></a><span class="dt">@@ -1,15 +1,16 @@</span></span>
<span id="cb36-6"><a href="#cb36-6" aria-hidden="true" tabindex="-1"></a> #define x char</span>
<span id="cb36-7"><a href="#cb36-7" aria-hidden="true" tabindex="-1"></a> #define z else</span>
<span id="cb36-8"><a href="#cb36-8" aria-hidden="true" tabindex="-1"></a> #define w gets</span>
<span id="cb36-9"><a href="#cb36-9" aria-hidden="true" tabindex="-1"></a><span class="va">+#define gets(b) ((b)[0]=&#39;\0&#39;,(fgets((b), 100, stdin)))</span></span>
<span id="cb36-10"><a href="#cb36-10" aria-hidden="true" tabindex="-1"></a> #define r if</span>
<span id="cb36-11"><a href="#cb36-11" aria-hidden="true" tabindex="-1"></a> #define u int</span>
<span id="cb36-12"><a href="#cb36-12" aria-hidden="true" tabindex="-1"></a> #define s main</span>
<span id="cb36-13"><a href="#cb36-13" aria-hidden="true" tabindex="-1"></a> #define v putchar</span>
<span id="cb36-14"><a href="#cb36-14" aria-hidden="true" tabindex="-1"></a> #define y while</span>
<span id="cb36-15"><a href="#cb36-15" aria-hidden="true" tabindex="-1"></a> #define t &quot; A?B?K?L?CIF?MSP?E?H?O?R?DJG?NTQ?????U?V?????X???????Z????W??Y??&quot;</span>
<span id="cb36-16"><a href="#cb36-16" aria-hidden="true" tabindex="-1"></a><span class="st">- s ( ) { x* c , b[ 5 * 72 ]; u a, e , d [ 9</span></span>
<span id="cb36-17"><a href="#cb36-17" aria-hidden="true" tabindex="-1"></a><span class="va">+ s ( ) { x* c , b[ 5 * 72 ]; u a, e , d [ 9</span></span>
<span id="cb36-18"><a href="#cb36-18" aria-hidden="true" tabindex="-1"></a> *9 *9 ] ; y (w ( b) ){ r ( 0 [ b] -7 *</span>
<span id="cb36-19"><a href="#cb36-19" aria-hidden="true" tabindex="-1"></a> 5 ) { c = b ; y ( (* c - 6</span>
<span id="cb36-20"><a href="#cb36-20" aria-hidden="true" tabindex="-1"></a> * 7 )* * c )c = c+ 1 ; r (( -0 ) [ c ] &amp;&amp; w ( b +</span>
<span id="cb36-21"><a href="#cb36-21" aria-hidden="true" tabindex="-1"></a> 8 * 5* 3 ) &amp;&amp; w (b +8 *5 * 6) )</span>
<span id="cb36-22"><a href="#cb36-22" aria-hidden="true" tabindex="-1"></a> { a = 0; y ( a [ b ]</span></code></pre></div>
<p>But since it does not for the time being it is advisable to just
redirect <code>stderr</code> to <code>/dev/null</code>
(<code>2&gt;/dev/null</code>).</p>
<h2 id="jonth">1996 jonth</h2>
<h3 id="status-inabiaf---please-do-not-fix-23">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1996jonthjonth.c">Source code: <a
href="1996/jonth/jonth.c">1996/jonth/jonth.c</a></h3>
<h3 id="information-1996jonthreadme.md">Information: <a
href="1996/jonth/README.md">1996/jonth/README.md</a></h3>
<p>If X is not running this program will very likely crash or do
something funny. This should NOT be fixed.</p>
<p>NOTE: the two boards will be on top of each other so you will have to
drag one off the other so that you can properly play.</p>
<h3 id="status-missing-or-dead-link---please-provide-them-2">STATUS:
missing or dead link - please provide them</h3>
<p>As well: the link which was http://www.uio.no/~jonth is no longer
valid and there’s no archive on the Internet Wayback Machine. Do you
know of a proper URL? We greatly appreciate your help here!</p>
<h1 id="section-13">1997</h1>
<p>There was no IOCCC in 1997.</p>
<h1 id="section-14">1998</h1>
<h2 id="dlowe">1998 dlowe</h2>
<h3 id="status-missing-or-dead-link---please-provide-them-3">STATUS:
missing or dead link - please provide them</h3>
<h3 id="source-code-1998dlowedlowe.c">Source code: <a
href="1998/dlowe/dlowe.c">1998/dlowe/dlowe.c</a></h3>
<h3 id="information-1998dlowereadme.md">Information: <a
href="1998/dlowe/README.md">1998/dlowe/README.md</a></h3>
<p>The domain http://pootpoot.com no longer exists as it once did. The
judges have given a script that can be used to make a similar page
(<strong>warning: not checked for security in modern days!</strong>). Do
you have a server with enough bandwidth and would like to set it up?
We’ll gladly thank you in the README.md file and link to the page as
well! You’ll have IOCCC fame for reviving a pootifier! :-)</p>
<h2 id="dloweneil">1998 dloweneil</h2>
<h3 id="status-missing-or-dead-link---please-provide-them-4">STATUS:
missing or dead link - please provide them</h3>
<h3 id="source-code-1998dloweneildloweneil.c">Source code: <a
href="1998/dloweneil/dloweneil.c">1998/dloweneil/dloweneil.c</a></h3>
<h3 id="information-1998dloweneilreadme.md">Information: <a
href="1998/dloweneil/README.md">1998/dloweneil/README.md</a></h3>
<p>See above entry <a href="1998/dlowe/dlowe.c">1998/dlowe</a>.</p>
<h2 id="schnitzi-1">1998 schnitzi</h2>
<h3 id="status-inabiaf---please-do-not-fix-24">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-1998schnitzischnitzi.c">Source code: <a
href="1998/schnitzi/schnitzi.c">1998/schnitzi/schnitzi.c</a></h3>
<h3 id="information-1998schnitzireadme.md">Information: <a
href="1998/schnitzi/README.md">1998/schnitzi/README.md</a></h3>
<p>A point worth considering is that as the number passed into the
program gets bigger the number of lines of output gets substantially
larger. For instance:</p>
<div class="sourceCode" id="cb37"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./schnitzi 9<span class="kw">|</span><span class="fu">wc</span> <span class="at">-l</span></span>
<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">771999</span></span></code></pre></div>
<p>The larger the number the bigger the file can become too, even
becoming gigabytes in size. The range is checked for
<code>&gt;0 &amp;&amp; &lt;27</code> as not having this can be a problem
including a segfault.</p>
<p>If you use the generated program and do not give enough numbers in
input something funny will happen, very possibly with different results
per run. This is in the README.md file as something to try and
ponder.</p>
<h1 id="section-15">1999</h1>
<p>There was no IOCCC in 1999.</p>
<h1 id="section-16">2000</h1>
<h2 id="dlowe-1">2000 dlowe</h2>
<h3
id="status-doesnt-work-with-some-platforms---please-help-us-fix-1">STATUS:
doesn’t work with some platforms - please help us fix</h3>
<h3 id="source-code-2000dlowedlowe.c">Source code: <a
href="2000/dlowe/dlowe.c">2000/dlowe/dlowe.c</a></h3>
<h3 id="information-2000dlowereadme.md">Information: <a
href="2000/dlowe/README.md">2000/dlowe/README.md</a></h3>
<p>This <strong>MIGHT</strong> be better described as doesn’t work with
some versions of perl: the author states that in perl &lt; 5.6.0 there
is a bug with a core dump in what they said is in
<code>Perl_sv_upgrade</code>. 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.</p>
<p>In macOS this program crashes. A tip from Cody is that the code that
crashes is:</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a>perl_eval_sv</span>
<span id="cb38-2"><a href="#cb38-2" aria-hidden="true" tabindex="-1"></a><span class="op">(</span>newSVpv<span class="op">(</span><span class="st">&quot;_:$_= &lt;&gt; ; defined or exit; @ARGV&quot;</span></span>
<span id="cb38-3"><a href="#cb38-3" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;=split; __:$_= shift;defined or goto _; chomp &quot;</span></span>
<span id="cb38-4"><a href="#cb38-4" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;;(m*^</span><span class="sc">\\</span><span class="st">x70oO&quot;</span> <span class="st">&quot;</span><span class="sc">\\</span><span class="st">x74$*i)?(pri&quot;</span> <span class="st">&quot;nt </span><span class="sc">\&quot;</span><span class="st">$_ w</span><span class="sc">\\</span><span class="st">x&quot;</span></span>
<span id="cb38-5"><a href="#cb38-5" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;61s h</span><span class="sc">\\</span><span class="st">145r</span><span class="sc">\\</span><span class="st">x&quot;</span> <span class="st">&quot;65!</span><span class="sc">\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st">):((m*&quot;</span> <span class="st">&quot;^</span><span class="sc">\\</span><span class="st">s</span><span class="sc">\\</span><span class="st">*(-?</span><span class="sc">\\</span><span class="st">d+&quot;</span></span>
<span id="cb38-6"><a href="#cb38-6" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;(</span><span class="sc">\\</span><span class="st">.</span><span class="sc">\\</span><span class="st">d+)?)</span><span class="sc">\\</span><span class="st">s&quot;</span> <span class="st">&quot;</span><span class="sc">\\</span><span class="st">*$*)?(push@SS ,$1):(&amp;{chr(((o&quot;</span></span>
<span id="cb38-7"><a href="#cb38-7" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;rd)%39)+3**4)x2 } )); goto __; sub ff { @SS= (&quot;</span></span>
<span id="cb38-8"><a href="#cb38-8" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;)} sub __{print </span><span class="sc">\&quot;</span><span class="st">stack empty</span><span class="sc">\\</span><span class="st">&quot;</span> <span class="st">&quot;n</span><span class="sc">\&quot;</span><span class="st">} sub ss{$#&quot;</span></span>
<span id="cb38-9"><a href="#cb38-9" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;SS&lt;0 and goto &amp; __; print $SS[$&quot;</span> <span class="st">&quot;#SS].</span><span class="sc">\&quot;\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st">} &quot;</span></span>
<span id="cb38-10"><a href="#cb38-10" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;sub SS{ $#SS&lt;0 and goto &amp;__ ; print pop @SS}&quot;</span></span>
<span id="cb38-11"><a href="#cb38-11" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;sub _ { print </span><span class="sc">\&quot;</span><span class="st">divide by zer&quot;</span> <span class="st">&quot;o</span><span class="sc">\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st">}sub ii{&quot;</span></span>
<span id="cb38-12"><a href="#cb38-12" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;map{ print</span><span class="sc">\&quot;</span><span class="st">$_&quot;</span> <span class="st">&quot;</span><span class="sc">\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st"> } reverse @SS} sub AUTOLO&quot;</span></span>
<span id="cb38-13"><a href="#cb38-13" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;AD { print</span><span class="sc">\&quot;</span><span class="st">un&quot;</span> <span class="st">&quot;implemented</span><span class="sc">\\</span><span class="st">n&quot;</span> <span class="st">&quot;</span><span class="sc">\&quot;</span><span class="st">} sub gg{ $#&quot;</span></span>
<span id="cb38-14"><a href="#cb38-14" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;SS&lt;0 and goto &amp;__;push@SS,$SS[ $#SS]} sub uu{ &quot;</span></span>
<span id="cb38-15"><a href="#cb38-15" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;$#SS&lt;1 and goto &amp;__;$SS[ $#SS]+= $SS[$#SS-1];$SS&quot;</span></span>
<span id="cb38-16"><a href="#cb38-16" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;[$#SS-1]=$SS[$&quot;</span> <span class="st">&quot;#SS]-$SS[$#SS-&quot;</span> <span class="st">&quot;1]; $SS[$#SS]-&quot;</span></span>
<span id="cb38-17"><a href="#cb38-17" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;=$SS[$#SS-1]} &quot;</span><span class="op">,</span><span class="dv">0</span><span class="op">),</span><span class="dv">0</span> <span class="op">);</span></span></code></pre></div>
<p>and in particular it appears that it is the perl itself. In other
words if one changes it to be:</p>
<div class="sourceCode" id="cb39"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a>perl_eval_sv<span class="op">(</span>newSVpv<span class="op">(</span><span class="st">&quot;&quot;</span><span class="op">,</span><span class="dv">0</span><span class="op">),</span><span class="dv">0</span><span class="op">);</span></span></code></pre></div>
<p>it will not crash. But of course it won’t do anything either. So it’s
more specifically that the call to <code>newSVpv()</code> crashes the
code but <em>INSIDE</em> (key point!) the call to
<code>perl_eval_sv()</code> that does it. Given what the author stated
and that the version of perl is &lt; than 5.6.0 that might be exactly
what is going on.</p>
<p>The example command above <em>should</em> print:</p>
<div class="sourceCode" id="cb40"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">&quot;13 14 15 16 17 + - * / p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
<span id="cb40-2"><a href="#cb40-2" aria-hidden="true" tabindex="-1"></a><span class="ex">-0.0515873015873016</span></span></code></pre></div>
<p>and that’s what it shows in linux.</p>
<p>Note that with different perl libraries in macOS (for instance from
<a href="https://brew.sh">Homebrew</a> and <a
href="https://www.macports.org">MacPorts</a> 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.</p>
<h3 id="status-known-bug---please-help-us-fix-11">STATUS: known bug -
please help us fix</h3>
<p>The author gives an example command:</p>
<div class="sourceCode" id="cb41"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;7 P 6 d P P 8 p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span> <span class="kw">|</span> <span class="fu">tr</span> 876 tpo</span></code></pre></div>
<p>which should print out <code>poot</code> but it doesn’t, not in linux
and not in macOS.</p>
<p>In linux it doesn’t crash but it doesn’t print anything out
either.</p>
<p>In macOS it crashes; it might appear to not crash in macOS but this
is because of the pipeline. If you remove the <code>| tr 876 tpo</code>
part of the command you will see that it does indeed crash!</p>
<p>The reason for this not working is really strange.</p>
<div class="sourceCode" id="cb42"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">&quot;7 P 6 d P P 8 p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
<span id="cb42-2"><a href="#cb42-2" aria-hidden="true" tabindex="-1"></a><span class="ex">7668</span></span>
<span id="cb42-3"><a href="#cb42-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">&quot;7 P 6 d P P 8 p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span> <span class="kw">|</span> <span class="fu">grep</span> 7</span>
<span id="cb42-4"><a href="#cb42-4" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span></span></code></pre></div>
<p>Why? Is it writing to stdout? Let’s try some other things:</p>
<div class="sourceCode" id="cb43"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 7668 <span class="kw">|</span> <span class="fu">tr</span> 876 tpo</span>
<span id="cb43-2"><a href="#cb43-2" aria-hidden="true" tabindex="-1"></a><span class="ex">poot</span></span></code></pre></div>
<p>Okay so we know that it SHOULD work. But we also know something funny
is going on with stdout and the entry. Another experiment:</p>
<div class="sourceCode" id="cb44"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">&quot;7 P 6 d P P 8 p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span> <span class="dv">1</span><span class="op">&gt;&amp;</span><span class="dv">2</span> <span class="kw">|</span> <span class="fu">grep</span> 7</span>
<span id="cb44-2"><a href="#cb44-2" aria-hidden="true" tabindex="-1"></a><span class="ex">7668</span></span></code></pre></div>
<p>Okay so now it sees it, <code>grep</code>. But watch!</p>
<div class="sourceCode" id="cb45"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">&quot;7 P 6 d P P 8 p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span> <span class="dv">2</span><span class="op">&gt;</span>foo <span class="dv">1</span><span class="op">&gt;&amp;</span><span class="dv">1</span></span>
<span id="cb45-2"><a href="#cb45-2" aria-hidden="true" tabindex="-1"></a><span class="ex">7668</span></span>
<span id="cb45-3"><a href="#cb45-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> cat foo</span></code></pre></div>
<p>.. so at this hour it does appear to be writing to stdout but yet
somehow it doesn’t? But watch:</p>
<div class="sourceCode" id="cb46"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">&quot;7 P 6 d P P 8 p&quot;</span> <span class="kw">|</span> <span class="ex">./dlowe</span> <span class="dv">1</span><span class="op">&gt;</span>foo <span class="dv">1</span><span class="op">&gt;&amp;</span><span class="dv">1</span></span>
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> cat foo</span>
<span id="cb46-3"><a href="#cb46-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span></span></code></pre></div>
<p>Well this explains why the <code>tr</code> does not transliterate it
to <code>poot</code> but why is this happening? Why can’t it be
redirected to another file even?</p>
<p>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.</p>
<p>Other commands do work, however, and give the appropriate output,
such as:</p>
<div class="sourceCode" id="cb47"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 1 2 + p <span class="kw">|</span> <span class="ex">./dlowe</span></span>
<span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a><span class="ex">3</span></span></code></pre></div>
<p>so something is wrong with some commands/operators.</p>
<p>Another feature that does work in linux is:</p>
<div class="sourceCode" id="cb48"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo poot <span class="kw">|</span> <span class="ex">./dlowe</span></span>
<span id="cb48-2"><a href="#cb48-2" aria-hidden="true" tabindex="-1"></a><span class="ex">poot</span> was here!</span></code></pre></div>
<p>Can you help fix these problems?</p>
<p>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 below for how to go further than unimplemented)
which is the exact perl from the C program except that it has the
<code>#!/usr/bin/env perl</code> and <code>use warnings;</code> as well.
A note below might suggest that doing this creates incomplete perl.
Anyway:</p>
<div class="sourceCode" id="cb49"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;stdio.h&gt;</span></span>
<span id="cb49-2"><a href="#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">void</span><span class="op">)</span></span>
<span id="cb49-3"><a href="#cb49-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
<span id="cb49-4"><a href="#cb49-4" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;#!/usr/bin/env perl</span><span class="sc">\n</span><span class="st">use warnings;_:$_= &lt;&gt; ; defined or exit; @ARGV&quot;</span></span>
<span id="cb49-5"><a href="#cb49-5" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;=split; __:$_= shift;defined or goto _; chomp &quot;</span></span>
<span id="cb49-6"><a href="#cb49-6" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;;(m*^</span><span class="sc">\\</span><span class="st">x70oO&quot;</span> <span class="st">&quot;</span><span class="sc">\\</span><span class="st">x74$*i)?(pri&quot;</span> <span class="st">&quot;nt </span><span class="sc">\&quot;</span><span class="st">$_ w</span><span class="sc">\\</span><span class="st">x&quot;</span></span>
<span id="cb49-7"><a href="#cb49-7" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;61s h</span><span class="sc">\\</span><span class="st">145r</span><span class="sc">\\</span><span class="st">x&quot;</span> <span class="st">&quot;65!</span><span class="sc">\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st">):((m*&quot;</span> <span class="st">&quot;^</span><span class="sc">\\</span><span class="st">s</span><span class="sc">\\</span><span class="st">*(-?</span><span class="sc">\\</span><span class="st">d+&quot;</span></span>
<span id="cb49-8"><a href="#cb49-8" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;(</span><span class="sc">\\</span><span class="st">.</span><span class="sc">\\</span><span class="st">d+)?)</span><span class="sc">\\</span><span class="st">s&quot;</span> <span class="st">&quot;</span><span class="sc">\\</span><span class="st">*$*)?(push@SS ,$1):(&amp;{chr(((o&quot;</span></span>
<span id="cb49-9"><a href="#cb49-9" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;rd)</span><span class="sc">%%</span><span class="st">39)+3**4)x2 } )); goto __; sub ff { @SS= (&quot;</span></span>
<span id="cb49-10"><a href="#cb49-10" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;)} sub __{print </span><span class="sc">\&quot;</span><span class="st">stack empty</span><span class="sc">\\</span><span class="st">&quot;</span> <span class="st">&quot;n</span><span class="sc">\&quot;</span><span class="st">} sub ss{$#&quot;</span></span>
<span id="cb49-11"><a href="#cb49-11" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;SS&lt;0 and goto &amp; __; print $SS[$&quot;</span> <span class="st">&quot;#SS].</span><span class="sc">\&quot;\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st">} &quot;</span></span>
<span id="cb49-12"><a href="#cb49-12" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;sub SS{ $#SS&lt;0 and goto &amp;__ ; print pop @SS}&quot;</span></span>
<span id="cb49-13"><a href="#cb49-13" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;sub _ { print </span><span class="sc">\&quot;</span><span class="st">divide by zer&quot;</span> <span class="st">&quot;o</span><span class="sc">\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st">}sub ii{&quot;</span></span>
<span id="cb49-14"><a href="#cb49-14" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;map{ print</span><span class="sc">\&quot;</span><span class="st">$_&quot;</span> <span class="st">&quot;</span><span class="sc">\\</span><span class="st">n</span><span class="sc">\&quot;</span><span class="st"> } reverse @SS} sub AUTOLO&quot;</span></span>
<span id="cb49-15"><a href="#cb49-15" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AD { print</span><span class="sc">\&quot;</span><span class="st">un&quot;</span> <span class="st">&quot;implemented</span><span class="sc">\\</span><span class="st">n&quot;</span> <span class="st">&quot;</span><span class="sc">\&quot;</span><span class="st">} sub gg{ $#&quot;</span></span>
<span id="cb49-16"><a href="#cb49-16" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;SS&lt;0 and goto &amp;__;push@SS,$SS[ $#SS]} sub uu{ &quot;</span></span>
<span id="cb49-17"><a href="#cb49-17" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;$#SS&lt;1 and goto &amp;__;$SS[ $#SS]+= $SS[$#SS-1];$SS&quot;</span></span>
<span id="cb49-18"><a href="#cb49-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;[$#SS-1]=$SS[$&quot;</span> <span class="st">&quot;#SS]-$SS[$#SS-&quot;</span> <span class="st">&quot;1]; $SS[$#SS]-&quot;</span></span>
<span id="cb49-19"><a href="#cb49-19" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;=$SS[$#SS-1]}&quot;</span><span class="op">);</span></span>
<span id="cb49-20"><a href="#cb49-20" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>Compiling this you can generate:</p>
<div class="sourceCode" id="cb50"><pre
class="sourceCode perl"><code class="sourceCode perl"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="kw">#!/usr/bin/env perl</span></span>
<span id="cb50-2"><a href="#cb50-2" aria-hidden="true" tabindex="-1"></a><span class="fu">use</span> <span class="kw">warnings</span>;_:<span class="wa">$_</span>= &lt;&gt; ; <span class="fu">defined</span> <span class="ot">or</span> <span class="fu">exit</span>; <span class="wa">@ARGV</span>=<span class="fu">split</span>; __:<span class="wa">$_</span>= <span class="fu">shift</span>;<span class="fu">defined</span> <span class="ot">or</span> <span class="fu">goto</span> _; <span class="fu">chomp</span> ;(<span class="ot">m*</span><span class="ch">^</span><span class="wa">\x70</span><span class="ot">oO</span><span class="wa">\x74$*</span><span class="ot">i</span><span class="ch">)?(</span><span class="ot">print &quot;</span><span class="wa">$_</span><span class="ot"> w</span><span class="wa">\x61</span><span class="ot">s h</span><span class="wa">\145</span><span class="ot">r</span><span class="wa">\x65</span><span class="ot">!</span><span class="bn">\n</span><span class="ot">&quot;</span><span class="ch">)</span><span class="ot">:</span><span class="ch">((</span><span class="ot">m</span><span class="ch">*^</span><span class="bn">\s</span><span class="ot">\*</span><span class="ch">(</span><span class="ot">-</span><span class="ch">?</span><span class="bn">\d</span><span class="ch">+(</span><span class="ot">\.</span><span class="bn">\d</span><span class="ch">+)?)</span><span class="bn">\s</span><span class="ot">\*</span><span class="wa">$*</span><span class="ch">)?(</span><span class="ot">push</span><span class="dt">@SS</span><span class="ot"> ,</span><span class="wa">$1</span><span class="ch">)</span><span class="ot">:</span><span class="ch">(</span><span class="ot">&amp;{chr</span><span class="ch">(((</span><span class="ot">ord</span><span class="ch">)</span><span class="ot">%39</span><span class="ch">)+</span><span class="ot">3</span><span class="ch">**</span><span class="ot">4</span><span class="ch">)</span><span class="ot">x2 } </span><span class="ch">))</span><span class="ot">; goto __; sub ff { </span><span class="dt">@SS</span><span class="ot">= </span><span class="ch">()</span><span class="ot">} sub __{print &quot;stack empty</span><span class="bn">\n</span><span class="ot">&quot;} sub ss{</span><span class="dt">$#SS</span><span class="ot">&lt;0 and goto &amp; __; print </span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS</span><span class="ch">]</span><span class="ot">.&quot;</span><span class="bn">\n</span><span class="ot">&quot;} sub SS{ </span><span class="dt">$#SS</span><span class="ot">&lt;0 and goto &amp;__ ; print pop </span><span class="dt">@SS</span><span class="ot">}sub _ { print &quot;divide by zero</span><span class="bn">\n</span><span class="ot">&quot;}sub ii{map{ print&quot;</span><span class="wa">$_</span><span class="bn">\n</span><span class="ot">&quot; } reverse </span><span class="dt">@SS</span><span class="ot">} sub AUTOLOAD { print&quot;unimplemented</span><span class="bn">\n</span><span class="ot">&quot;} sub gg{ </span><span class="dt">$#SS</span><span class="ot">&lt;0 and goto &amp;__;push</span><span class="dt">@SS</span><span class="ot">,</span><span class="dt">$SS</span><span class="ch">[</span><span class="bn"> $#SS</span><span class="ch">]</span><span class="ot">} sub uu{ </span><span class="dt">$#SS</span><span class="ot">&lt;1 and goto &amp;__;</span><span class="dt">$SS</span><span class="ch">[</span><span class="bn"> $#SS</span><span class="ch">]+</span><span class="ot">= </span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS-1</span><span class="ch">]</span><span class="ot">;</span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS-1</span><span class="ch">]</span><span class="ot">=</span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS</span><span class="ch">]</span><span class="ot">-</span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS-1</span><span class="ch">]</span><span class="ot">; </span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS</span><span class="ch">]</span><span class="ot">-=</span><span class="dt">$SS</span><span class="ch">[</span><span class="bn">$#SS-1</span><span class="ch">]</span><span class="ot">}</span></span></code></pre></div>
<p>Here is example input/output:</p>
<pre><code>p
stack empty
5 p
5
5 + 5 p
unimplemented
5
P
5
p
5</code></pre>
<p>So you can see that if one uses operators it just shows
‘unimplemented’ (observe 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).</p>
<p>To not get ‘unimplemented’ you can remove from the perl:</p>
<div class="sourceCode" id="cb52"><pre
class="sourceCode perl"><code class="sourceCode perl"><span id="cb52-1"><a href="#cb52-1" aria-hidden="true" tabindex="-1"></a><span class="kw">sub </span><span class="fu">AUTOLOAD</span> { print<span class="ot">&quot;</span><span class="st">unimplemented</span><span class="ch">\n</span><span class="ot">&quot;</span>}</span></code></pre></div>
<p>(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.)</p>
<p>Here is an example run of several operations in the perl script after
removing that subroutine:</p>
<div class="sourceCode" id="cb53"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb53-1"><a href="#cb53-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 5 p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-2"><a href="#cb53-2" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span>
<span id="cb53-3"><a href="#cb53-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 5 + p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-4"><a href="#cb53-4" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span>
<span id="cb53-5"><a href="#cb53-5" aria-hidden="true" tabindex="-1"></a><span class="ex">Undefined</span> subroutine <span class="kw">&amp;</span><span class="ex">main::UU</span> called at ./pl.pl line 2, <span class="op">&lt;&gt;</span> line 1.</span>
<span id="cb53-6"><a href="#cb53-6" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 5 <span class="pp">*</span> p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-7"><a href="#cb53-7" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span>
<span id="cb53-8"><a href="#cb53-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Undefined</span> subroutine <span class="kw">&amp;</span><span class="ex">main::ww</span> called at ./pl.pl line 2, <span class="op">&lt;&gt;</span> line 1.</span>
<span id="cb53-9"><a href="#cb53-9" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 5 <span class="at">-</span> p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-10"><a href="#cb53-10" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span>
<span id="cb53-11"><a href="#cb53-11" aria-hidden="true" tabindex="-1"></a><span class="ex">Undefined</span> subroutine <span class="kw">&amp;</span><span class="ex">main::WW</span> called at ./pl.pl line 2, <span class="op">&lt;&gt;</span> line 1.</span>
<span id="cb53-12"><a href="#cb53-12" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 5 / p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-13"><a href="#cb53-13" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span>
<span id="cb53-14"><a href="#cb53-14" aria-hidden="true" tabindex="-1"></a><span class="ex">Undefined</span> subroutine <span class="kw">&amp;</span><span class="ex">main::YY</span> called at ./pl.pl line 2, <span class="op">&lt;&gt;</span> line 1.</span>
<span id="cb53-15"><a href="#cb53-15" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 P <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-16"><a href="#cb53-16" aria-hidden="true" tabindex="-1"></a><span class="ex">5$</span> echo p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-17"><a href="#cb53-17" aria-hidden="true" tabindex="-1"></a><span class="ex">stack</span> empty</span>
<span id="cb53-18"><a href="#cb53-18" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo P <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb53-19"><a href="#cb53-19" aria-hidden="true" tabindex="-1"></a><span class="ex">stack</span> empty</span></code></pre></div>
<p>Note the undefined subroutine error: that happens with commands that
are not even in the program. Again the author used <code>AUTOLOAD</code>
for exception handling so it seems likely that there is something
missing (which the below shows as well). For instance inputting
<code>D</code> followed by <code>XX</code>:</p>
<pre><code>Undefined subroutine &amp;main::nn called at ./pl.pl line 2, &lt;&gt; line 6.
Undefined subroutine &amp;main::[[ called at ./pl.pl line 2, &lt;&gt; line 1.</code></pre>
<p>That means then that in linux despite the subroutines seemingly not
existing it works in the code, at least in some cases.</p>
<p>As far as the unimplemented error goes: the author stated that it
means there is 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:</p>
<div class="sourceCode" id="cb55"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo 5 5 + p <span class="kw">|</span> <span class="ex">./dlowe.pl</span></span>
<span id="cb55-2"><a href="#cb55-2" aria-hidden="true" tabindex="-1"></a><span class="ex">unimplemented</span></span>
<span id="cb55-3"><a href="#cb55-3" aria-hidden="true" tabindex="-1"></a><span class="ex">5</span></span></code></pre></div>
<p>which might (?) suggest that the <code>+</code> operator is
unimplemented. Unfortunately it has been many years since I have used
perl and I was never a guru either.</p>
<h2 id="primenum">2000 primenum</h2>
<h3 id="status-inabiaf---please-do-not-fix-25">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2000primenumprimenum.c">Source code: <a
href="2000/primenum/primenum.c">2000/primenum/primenum.c</a></h3>
<h3 id="information-2000primenumreadme.md">Information: <a
href="2000/primenum/README.md">2000/primenum/README.md</a></h3>
<p>This program does not do what you might think it does! Running it
like:</p>
<div class="sourceCode" id="cb56"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb56-1"><a href="#cb56-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./primenum</span> 13</span></code></pre></div>
<p>will seemingly wait for input exactly because it is waiting for
input. See the README.md file or look at the source.</p>
<p>Although the name of the program suggests it prints prime numbers
this is not the case. This is by design. See the author’s comments for
more details or better yet look at the code and if necessary try it out.
Please do not try and fix this.</p>
<p>A crash in the program is known as well. This is also a feature.
Please do not 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.</p>
<h2 id="rince">2000 rince</h2>
<h3 id="status-inabiaf---please-do-not-fix-26">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2000rincerince.c">Source code: <a
href="2000/rince/rince.c">2000/rince/rince.c</a></h3>
<h3 id="information-2000rincereadme.md">Information: <a
href="2000/rince/README.md">2000/rince/README.md</a></h3>
<p>If <code>DISPLAY</code> is not set the program will very likely
crash, do something strange (or if you’re very unlucky your computer
might <a
href="https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)">halt
and catch fire</a>! :-) ).</p>
<h1 id="section-17">2001</h1>
<h2 id="anonymous">2001 anonymous</h2>
<h3 id="status-inabiaf---please-do-not-fix-27">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2001anonymousanonymous.c">Source code: <a
href="2001/anonymous/anonymous.c">2001/anonymous/anonymous.c</a></h3>
<h3 id="information-2001anonymousreadme.md">Information: <a
href="2001/anonymous/README.md">2001/anonymous/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed this so that it doesn’t segfault and then also fixed the
functionality of it (but see below).</p>
<p>Cody also fixed the <a
href="2001/anonymous/anonymous.ten.c">anonymous.ten.c</a> program (it
also segfaulted) but notes that it <strong>MUST</strong> be compiled as
a <strong>32-bit ELF binary</strong> so it will NOT work in macOS (for
example); if you cannot use <code>-m32</code> or even if you can but it
cannot compile as an ELF binary (not elf binary :-) ) (but see below)
then the <code>anonymous</code> program itself will very likely crash if
you run it on the compiled <a
href="2001/anonymous/anonymous.ten.c">anonymous.ten.c</a> but if nothing
else it will not modify the target executable (this part of the fix at
least should be correct).</p>
<p>The file <code>2001/anonymous/anonymous.ten.32</code> is a
pre-compiled <a href="2001/anonymous.ten.c">2001/anonymous.ten.c</a> as
a 32-bit ELF binary in case you can run ELF binaries but cannot compile
32-bit binaries.</p>
<p>Other BSD Unices were not tested.</p>
<p>Note also that if you don’t specify a file or you specify a
non-32-bit ELF file this program will very likely crash or do something
strange like slaughter the elves of Imladris :-(</p>
<h2 id="bellard">2001 bellard</h2>
<h3 id="status-inabiaf---please-do-not-fix-28">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3
id="status-doesnt-work-with-some-platforms---please-help-us-fix-2">STATUS:
doesn’t work with some platforms - please help us fix</h3>
<h3 id="source-code-2001bellardbellard.c">Source code: <a
href="2001/bellard/bellard.c">2001/bellard/bellard.c</a></h3>
<h3 id="information-2001bellardreadme.md">Information: <a
href="2001/bellard/README.md">2001/bellard/README.md</a></h3>
<p>The two statuses might seem contradictory but that is a complicated
question. The author stated that it only works with i386 linux so on the
one hand the fact it doesn’t work in modern systems is considered a
feature and not a bug. But on the other hand it would be nice if there
was an alternate version which worked for modern systems. This does seem
quite unlikely but some fixes, described next, were made.</p>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed an initial segfault (trying to open the file) and he also fixed
the <a href="2001/bellard/bellard.otccex.c">supplementary program
bellard.otccex.c</a> but this still crashes in systems not i386 linux
which is what the author stated.</p>
<p>On the other hand if you do have a fix for 64-bit systems you’re
welcome to provide it as an alternate version. If by chance you have a
fix so that it works for both 32-bit and 64-bit systems that is also
okay.</p>
<p>The author said that they compiled it with <a
href="https://ftp.gnu.org/gnu/gcc/gcc-2.95.2/gcc-everything-2.95.2.tar.gz">gcc
version 2.95.2</a>. We don’t know if a certain gcc version is necessary
but it might be helpful to download and compile that version to test it
- or it might not.</p>
<p>I (Cody) have no i386 system to test this but perhaps this is why I
can’t get it to work. Yusuke was able to get this to work with
<code>-m32</code> but only in an emulator.</p>
<p>On the author’s <a href="https://bellard.org/otcc/">web page for this
program</a> it is explicitly stated that it requires i386 linux.</p>
<p>There I found what should be a more portable version which is
included as <a href="2001/bellard/otccelf.c">otccelf.c</a> (after adding
some <code>#include</code>s and the modification by Yusuke noted in the
<a href="/thanks-for-help.md">thanks</a> file) but it appears this
<em>also</em> requires i386 linux; indeed looking at the code it hard
codes paths that are i386 specific to linux.</p>
<p>Another point of interest is that the author provided de-obfuscated
versions which might be of value to look at. I might do that as well but
this entry is very likely never going to work for 64-bit linux so that’s
not that likely since there are other things that are more
important.</p>
<p>If you have a fix for 64-bit systems this is welcome as an alternate
version, as stated above. You might like to look at the otccelf version
but note that it (at least in 64-bit linux and macOS) has compilation
errors.</p>
<h3 id="aside-why-were-there-changes-made-if-inabiaf">Aside: why were
there changes made if INABIAF ?</h3>
<p>This is a good question. The reason is we believe it better to fix
some obvious problems: there were some bugs that would very possibly
prevent it from working even if it was in i386 linux though Yusuke
seemed to get it to work in an emulator so perhaps not. Still it’s
better to have the type of the file pointer correct and so that the file
can at least be opened in modern systems even if the compiler won’t work
there.</p>
<p>Also the supplementary program, which did not work at all, was fixed
(by Cody) and it can be run by itself for fun in modern systems, which
was not possible before the fixes there.</p>
<h2 id="dgbeards">2001 dgbeards</h2>
<h3 id="status-inabiaf---please-do-not-fix-29">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2001dgbeardsdgbeards.c">Source code: <a
href="2001/dgbeards/dgbeards.c">2001/dgbeards/dgbeards.c</a></h3>
<h3 id="information-2001dgbeardsreadme.md">Information: <a
href="2001/dgbeards/README.md">2001/dgbeards/README.md</a></h3>
<p>This program deliberately crashes if it loses (which is what it aims
to do).</p>
<h2 id="herrmann1">2001 herrmann1</h2>
<h3 id="status-missing-files---please-provide-them-1">STATUS: missing
files - please provide them</h3>
<h3 id="source-code-2001herrmann1herrmann1.c">Source code: <a
href="2001/herrmann1/herrmann1.c">2001/herrmann1/herrmann1.c</a></h3>
<h3 id="information-2001herrmann1readme.md">Information: <a
href="2001/herrmann1/README.md">2001/herrmann1/README.md</a></h3>
<p>The author referred to the file <code>herrmann1.turing</code> but it
does not exist not even in the archive. Do you have a copy? Please
provide it!</p>
<h3 id="status-known-bug---please-help-us-fix-12">STATUS: known bug -
please help us fix</h3>
<p>There is also a bug in part. During compilation you’re supposed to
see some animation but this does not seem to work with modern gcc
versions. It appears that version 2.95 works but maybe others do as
well. Do you have a fix? We would appreciate your help!</p>
<p>If you want to try and fix this (mis)feature, you are welcome to
try.</p>
<h2 id="kev">2001 kev</h2>
<h3 id="status-inabiaf---please-do-not-fix-30">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2001kevkev.c">Source code: <a
href="2001/kev/kev.c">2001/kev/kev.c</a></h3>
<h3 id="information-2001kevreadme.md">Information: <a
href="2001/kev/README.md">2001/kev/README.md</a></h3>
<p>Sometimes when one player presses <code>q</code> it will result in
broken pipe on the other end.</p>
<p>The author also noted that some versions of <code>curses</code> have
problems with <code>getch()</code> having a delay.</p>
<p>The program is very likely to segfault if the specified port can’t be
bound or connected to.</p>
<p>If the terminal is too wide (the author suggests over 500 characters)
the program can segfault.</p>
<p>It’s also possible to crash the program if a player scores over a
billion points.</p>
<p>Although it is independent of endianness both systems need the same
character set. In other words both have to be ASCII or EBCDIC - not one
of each.</p>
<h2 id="rosten">2001 rosten</h2>
<h3 id="status-missing-files---please-provide-them-2">STATUS: missing
files - please provide them</h3>
<h3 id="source-code-2001rostenrosten.c">Source code: <a
href="2001/rosten/rosten.c">2001/rosten/rosten.c</a></h3>
<h3 id="information-2001rostenreadme.md">Information: <a
href="2001/rosten/README.md">2001/rosten/README.md</a></h3>
<p>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.</p>
<h2 id="schweikh">2001 schweikh</h2>
<h3 id="status-inabiaf---please-do-not-fix-31">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2001schweikhschweikh.c">Source code: <a
href="2001/schweikh/schweikh.c">2001/schweikh/schweikh.c</a></h3>
<h3 id="information-2001schweikhreadme.md">Information: <a
href="2001/schweikh/README.md">2001/schweikh/README.md</a></h3>
<p>The glob pattern must match the whole string. See the author’s
comments for details and a workaround.</p>
<p>There’s also no way to escape meta characters.</p>
<h2 id="westley-3">2001 westley</h2>
<h3 id="status-uses-gets---change-to-fgets-if-possible-4">STATUS: uses
gets() - change to fgets() if possible</h3>
<h3 id="source-code-2001westleywestley.c">Source code: <a
href="2001/westley/westley.c">2001/westley/westley.c</a></h3>
<h3 id="information-2001westleyreadme.md">Information: <a
href="2001/westley/README.md">2001/westley/README.md</a></h3>
<p>This function uses <code>gets(3)</code> but it would be ideal if it
used <code>fgets(3)</code>. This one is rather complicated and will be
looked at later (some progress was made by Cody but it is less important
than other work) but you are welcome to try and fix this if you
wish.</p>
<h3
id="status-main-has-only-one-arg---try-and-make-it-have-2-or-3-1">STATUS:
main() has only one arg - try and make it have 2 or 3</h3>
<p>This program only has one arg to <code>main()</code>. However
changing it to have 2 is not as simple as it might seem. Doing this
breaks things. If memory serves changing it to two will, for instance,
break the punch card code output. It might be that that is for
<code>fgets(3)</code>, however, but the point remains: in order to test
any fixes you must determine if the extra files generated (some from
<code>sort(1)</code>) - see the README.md file - generate correct output
as well as that the main entry does too. You might try running the
<code>try.sh</code> script and redirect it to a file first so that you
can compare the output. Make sure to recreate the extra files as
described by the author if you do fix this. This might be looked at
later if nobody else takes up the challenge.</p>
<h3 id="status-missing-files---please-provide-them-3">STATUS: missing
files - please provide them</h3>
<p>The author referred to a file <code>card.gif</code> but this file is
missing. Do you have it? Please provide it!</p>
<h2 id="williams">2001 williams</h2>
<h3 id="status-known-bug---please-help-us-fix-13">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-2001williamswilliams.c">Source code: <a
href="2001/williams/williams.c">2001/williams/williams.c</a></h3>
<h3 id="information-2001williamsreadme.md">Information: <a
href="2001/williams/README.md">2001/williams/README.md</a></h3>
<p>There seem to be a couple bugs at least in this entry. The first one
is that when it does reach a certain point it crashes. This is in the
function <code>J()</code> (or one it calls?). But sometimes it seems to
not get that far, just showing lines moving back and forth. This is also
in <code>J()</code>. It is not confirmed but it might be that the lines
are drawn by <code>XDrawString()</code>, the last part in
<code>J()</code>.</p>
<p><code>J()</code> has a <code>for</code> loop identified by
<code>for</code> and also a couple <code>while</code> loops, identified
by <code>R</code>.</p>
<p>Since the game never ends properly the score is not printed
either.</p>
<p>It appears that the crash happens in more than one place. For
instance it has happened at</p>
<div class="sourceCode" id="cb57"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb57-1"><a href="#cb57-1" aria-hidden="true" tabindex="-1"></a>XCheckMaskEvent<span class="op">(</span>d<span class="op">,</span> <span class="dv">4</span><span class="op">,&amp;</span>e<span class="op">)</span></span></code></pre></div>
<p>but it’s also happened at</p>
<div class="sourceCode" id="cb58"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb58-1"><a href="#cb58-1" aria-hidden="true" tabindex="-1"></a><span class="cf">else</span> XDrawPoint<span class="op">(</span>d <span class="op">,</span>w<span class="op">,</span>g<span class="op">,(</span>l<span class="op">.</span>s<span class="op">+=</span>l<span class="op">.</span>a<span class="op">)&gt;&gt;</span><span class="dv">9</span><span class="op">,</span> h<span class="op">=(</span>l<span class="op">.</span>c<span class="op">+=</span>l<span class="op">.</span>b<span class="op">)&gt;&gt;</span><span class="dv">9</span><span class="op">)</span></span></code></pre></div>
<p>In both cases the pointer <code>d</code> was corrupted:</p>
<pre><code>(lldb) p d
(Display *) 0x0000000000000001</code></pre>
<p>It is believed that it also happened at</p>
<div class="sourceCode" id="cb60"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true" tabindex="-1"></a>XDrawString<span class="op">(</span>d<span class="op">,</span>w<span class="op">,</span>g<span class="op">,</span>W<span class="op">/</span><span class="dv">3</span><span class="op">,</span>H<span class="op">/</span><span class="dv">2</span><span class="op">,</span>m<span class="op">,</span>B<span class="op">);</span></span></code></pre></div>
<p>in <code>J()</code> and for the same reason.</p>
<p>The loop seems to be stuck in the call to <code>usleep(3)</code>
like:</p>
<div class="sourceCode" id="cb61"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb61-1"><a href="#cb61-1" aria-hidden="true" tabindex="-1"></a>usleep<span class="op">(</span>p<span class="op">*</span><span class="dv">200</span><span class="op">);</span></span></code></pre></div>
<p>which happens to be in a <code>while()</code> loop.</p>
<p>There is a way to get the code to crash. If you don’t do anything
until everything is destroyed (where you’d lose the game if it ended)
and then you start to shoot your missiles repeatedly it will eventually
crash. It appears not to be the case (though this was not tried as many
times) if you start shooting when the missiles come down. The fact you
can shoot after it starts that sleeping in a loop does suggest that it’s
not stuck only showing those lines and sleeping.</p>
<h1 id="section-18">2002</h1>
<p>There was no IOCCC in 2002.</p>
<h1 id="section-19">2003</h1>
<p>There was no IOCCC in 2003.</p>
<h1 id="section-20">2004</h1>
<h2 id="gavin">2004 gavin</h2>
<h3
id="status-compiled-executable-crashes---please-help-us-fix-1">STATUS:
compiled executable crashes - please help us fix</h3>
<h3
id="status-doesnt-work-with-some-platforms---please-help-us-fix-3">STATUS:
doesn’t work with some platforms - please help us fix</h3>
<h3 id="source-code-2004gavingavin.c">Source code: <a
href="2004/gavin/gavin.c">2004/gavin/gavin.c</a></h3>
<h3 id="information-2004gavinreadme.md">Information: <a
href="2004/gavin//README.md">2004/gavin//README.md</a></h3>
<p>Segmentation fault will occur in some systems. For instance on macOS
with the arm64 chip:</p>
<div class="sourceCode" id="cb62"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb62-1"><a href="#cb62-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./gavin</span> <span class="op">&gt;</span> kernel</span></code></pre></div>
<p>When trying to link <code>gavin.o</code> to produce <code>sh</code>,
the linker generates:</p>
<pre><code>Undefined symbols for architecture arm64:
&quot;start&quot;, referenced from:
-u command line option
(maybe you meant: __start)
ld: symbol(s) not found for architecture arm64</code></pre>
<p>We believe that this simply won’t work with non x86 specific systems
but perhaps you have a fix? We welcome your help!</p>
<h3 id="recent-2004gavin-mods">Recent 2004/gavin mods:</h3>
<p>Although not related some recent changes were made to 2004/gavin to
let it compile under clang. The following patch was applied:</p>
<div class="sourceCode" id="cb64"><pre
class="sourceCode patch"><code class="sourceCode diff"><span id="cb64-1"><a href="#cb64-1" aria-hidden="true" tabindex="-1"></a><span class="kw">diff --git a/2004/gavin/gavin.c b/2004/gavin/gavin.c</span></span>
<span id="cb64-2"><a href="#cb64-2" aria-hidden="true" tabindex="-1"></a>index c967b7e..2082b49 100644</span>
<span id="cb64-3"><a href="#cb64-3" aria-hidden="true" tabindex="-1"></a><span class="dt">--- a/2004/gavin/gavin.c</span></span>
<span id="cb64-4"><a href="#cb64-4" aria-hidden="true" tabindex="-1"></a><span class="dt">+++ b/2004/gavin/gavin.c</span></span>
<span id="cb64-5"><a href="#cb64-5" aria-hidden="true" tabindex="-1"></a><span class="dt">@@ -1,8 +1,9 @@</span></span>
<span id="cb64-6"><a href="#cb64-6" aria-hidden="true" tabindex="-1"></a><span class="va">+int main(int t, char **q, char **d) { return cain(t, (int)q, (int)d); }</span></span>
<span id="cb64-7"><a href="#cb64-7" aria-hidden="true" tabindex="-1"></a> #define G(n) int n(int t, int q, int d)</span>
<span id="cb64-8"><a href="#cb64-8" aria-hidden="true" tabindex="-1"></a> #define X(p,t,s) (p&gt;=t&amp;&amp;p&lt;(t+s)&amp;&amp;(p-(t)&amp;1023)&lt;(s&amp;1023))</span>
<span id="cb64-9"><a href="#cb64-9" aria-hidden="true" tabindex="-1"></a> #define U(m) *((signed char *)(m))</span>
<span id="cb64-10"><a href="#cb64-10" aria-hidden="true" tabindex="-1"></a> #define F if(!--q){</span>
<span id="cb64-11"><a href="#cb64-11" aria-hidden="true" tabindex="-1"></a><span class="st">-#define I(s) (int)main-(int)s</span></span>
<span id="cb64-12"><a href="#cb64-12" aria-hidden="true" tabindex="-1"></a><span class="va">+#define I(s) (int)cain-(int)s</span></span>
<span id="cb64-13"><a href="#cb64-13" aria-hidden="true" tabindex="-1"></a> #define P(s,c,k) for(h=0; h&gt;&gt;14==0; h+=129)Y(16*c+h/1024+Y(V+36))&amp;128&gt;&gt;(h&amp;7)?U(s+(h&amp;15367))=k:k</span>
<span id="cb64-14"><a href="#cb64-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb64-15"><a href="#cb64-15" aria-hidden="true" tabindex="-1"></a> G (B)</span>
<span id="cb64-16"><a href="#cb64-16" aria-hidden="true" tabindex="-1"></a><span class="dt">@@ -52,7 +53,7 @@ else</span></span>
<span id="cb64-17"><a href="#cb64-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb64-18"><a href="#cb64-18" aria-hidden="true" tabindex="-1"></a> G (_);</span>
<span id="cb64-19"><a href="#cb64-19" aria-hidden="true" tabindex="-1"></a> G (o);</span>
<span id="cb64-20"><a href="#cb64-20" aria-hidden="true" tabindex="-1"></a><span class="st">-G (main)</span></span>
<span id="cb64-21"><a href="#cb64-21" aria-hidden="true" tabindex="-1"></a><span class="va">+G (cain)</span></span>
<span id="cb64-22"><a href="#cb64-22" aria-hidden="true" tabindex="-1"></a> {</span>
<span id="cb64-23"><a href="#cb64-23" aria-hidden="true" tabindex="-1"></a> Z, k = K;</span>
<span id="cb64-24"><a href="#cb64-24" aria-hidden="true" tabindex="-1"></a> if (!t)</span></code></pre></div>
<p>The original Makefile from 2004 had the following to say about this
entry:</p>
<pre class="make"><code># Special flags for the gavin entry
#
# FYI: Older versions of GCC have a bug in -O2 optimization, hence -O1
#
GAVIN_OPT= -O1
GAVIN_FLAGS=\
&#39;-DY(m)=*((int*)(m))&#39;\
&#39;-DE(f,a,b,c)=((G((*)))(f))(a,b,c)&#39;\
&#39;-DM=for(D=0;D&lt;786432;D++)&#39;\
&#39;-DZ=int i=0,j=0,h,n,p=393728,s=26739,C,D&#39;\
&#39;-DV=0x90200&#39;\
&#39;-DK=0&#39;\
&#39;-DR=while((C=E(V-8,100,0,0))&amp;3&amp;&amp;(D=E(V-8,96,0,0))|3){&#39;\
&#39;-DL(c,d)=E(V+8,100,c,0);R}E(V+8,96,d,0);R}&#39;
# ...
# Best of Show
#
gavin: gavin.c
${CC} ${GAVIN_OPT} -o gavin ${GAVIN_FLAGS} gavin.c
${RM} -f kernel
./gavin &gt; kernel
${CC} ${GAVIN_OPT} -c ${GAVIN_FLAGS} -DB=_start &#39;-Dputchar(a)=&#39; gavin.c
${RM} -f sh
${LD} -s -o sh gavin.o
${RM} -f vi
${CP} sh vi
${RM} -f fs.tar
${TAR} -cvf fs.tar sh vi gavin.c README.md prim
gavin_clean:
${RM} -f sh vi kernel gavin.o
gavin_clobber: gavin_clean
${RM} -f gavin fs.tar
gavin_files: boot.b lilo.conf prim gavin_install.txt</code></pre>
<p>The current (<a href="2004/gavin/Makefile">Makefile</a> was modified
to try and fit into the current IOCCC build environment.</p>
<h3 id="status-inabiaf---please-do-not-fix-32">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<p>See <a href="2004/gavin/README.md#known-features">known features in
the README.md</a> for things that are not bugs but documented
(mis)features.</p>
<h2 id="jdalbec">2004 jdalbec</h2>
<h3 id="status-inabiaf---please-do-not-fix-33">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2004jdalbecjdalbec.c">Source code: <a
href="2004/jdalbec/jdalbec.c">2004/jdalbec/jdalbec.c</a></h3>
<h3 id="information-2004jdalbecreadme.md">Information: <a
href="2004/jdalbec/README.md">2004/jdalbec/README.md</a></h3>
<p>The author stated that:</p>
<pre><code>Arguments matching `/[^2]22$/` cause the program to segfault
after rapidly exhausting the available stack space. I could
probably fix this by adding some special cases to the code,
but [Blaine the Mono] it&#39;s quite a bit more exciting this way,
don&#39;t you think?[/Blaine] Since the trailing `22` will be
its own atom anyway, you can just insert a space in front of
it if you run into this feature (e.g. `1 22` instead of `122`).
Arguments matching `/(?:.){10,}/` will produce visually incorrect
results (e.g., generation 1 starting from 1111111111 will
print as `: 1`), but there&#39;s nothing interesting about these
arguments that can&#39;t be modeled using shorter runs of the same
symbol.
Arguments matching `/(?:.){257,}/` may produce mathematically
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.</code></pre>
<h2 id="sds">2004 sds</h2>
<h3 id="status-inabiaf---please-do-not-fix-34">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2004sdssds.c">Source code: <a
href="2004/sds/sds.c">2004/sds/sds.c</a></h3>
<h3 id="information-2004sdsreadme.md">Information: <a
href="2004/sds/README.md">2004/sds/README.md</a></h3>
<p>The generated code will very likely segfault or do something not
intended if not given the right args. See the README.md file for the
correct syntax.</p>
<h1 id="section-21">2005</h1>
<h2 id="anon">2005 anon</h2>
<h3 id="status-inabiaf---please-do-not-fix-35">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2005anonanon.c">Source code: <a
href="2005/anon/anon.c">2005/anon/anon.c</a></h3>
<h3 id="information-2005anonreadme.md">Information: <a
href="2005/anon/README.md">2005/anon/README.md</a></h3>
<p>This program sometimes will create unsolvable puzzles :-) just to
hook you. As a protection against this - and to prevent you from
spending too much time on such puzzles (or too big puzzles if you insist
on doing this) - it deliberately destroys its runtime stack. See the <a
href="2005/anon/README.md">README.md</a> for more details on this.</p>
<p>If you specify more than three args the program might also crash or
do something strange. This might also happen if you specify excessively
large board dimensions. Try <code>100 100 100</code> for instance and
see what happens!</p>
<h2 id="giljade">2005 giljade</h2>
<h3 id="status-inabiaf---please-do-not-fix-36">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2005giljadegiljade.c">Source code: <a
href="2005/giljade/giljade.c">2005/giljade/giljade.c</a></h3>
<h3 id="information-2005giljadereadme.md">Information: <a
href="2005/giljade/README.md">2005/giljade/README.md</a></h3>
<p>This entry will very likely segfault or do something strange if the
source code does not exist.</p>
<p>This entry requires that <code>sed</code> and <code>make</code> are
in the path.</p>
<h2 id="mikeash">2005 mikeash</h2>
<h3 id="status-inabiaf---please-do-not-fix-37">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2005mikeashmikeash.c">Source code: <a
href="2005/mikeash/mikeash.c">2005/mikeash/mikeash.c</a></h3>
<h3 id="information-2005mikeashreadme.md">Information: <a
href="2005/mikeash/README.md">2005/mikeash/README.md</a></h3>
<p>The author states:</p>
<ul>
<li><p>The only built-in functions are <code>defvar</code>,
<code>format</code>, <code>substitute</code>, <code>char-upcase</code>,
<code>+</code>, <code>-</code>, <code>*</code>, and
<code>/</code>.</p></li>
<li><p>Only one variable is available. This variable is called
<code>q</code>, although any symbol name starting with the letter
<code>q</code> will be mapped to this variable.</p></li>
<li><p>Only the first letter of a function name is significant. For
example, <code>format</code>, <code>f</code>, <code>farm</code>, and
various other words starting with <code>f</code> will all map to the
<code>format</code> function.</p></li>
<li><p>The <code>defvar</code> function completely ignores its first
parameter. It will always store the result of evaluating its second
parameter in <code>q</code>. Unlike in <a
href="https://en.wikipedia.org/wiki/Common_Lisp">Common Lisp</a>,
multiple invocations of <code>defvar</code> on the same variable will
overwrite old values.</p></li>
<li><p>Character constants are limited to <code>#\Newline</code> and
single-character constants such as <code>#\x</code>.</p></li>
<li><p>The <code>char-upcase</code> function will give strange results
if passed something other than a lowercase character.</p></li>
<li><p>The <code>format</code> function takes exactly three parameters.
The first parameter is ignored; output always goes to
<code>stdout</code>. The second parameter must have exactly one
<code>~s</code> format specifier in it, and no other format specifiers
are permitted.</p></li>
<li><p>The arithmetic functions take exactly two parameters.</p></li>
<li><p>All tokens must be separated from a following <code>)</code> by
whitespace.</p></li>
<li><p>A lot of other things. Notably, the language which this program
interprets is nowhere near <a
href="https://en.wikipedia.org/wiki/Turing_completeness">Turing-complete</a>.</p></li>
</ul>
<p>Basically, the [LISP][] interpreter is good for some basic math
operations, and for running itself.</p>
<h2 id="mynx">2005 mynx</h2>
<h3 id="status-inabiaf---please-do-not-fix-38">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2005mynxmynx.c">Source code: <a
href="2005/mynx/mynx.c">2005/mynx/mynx.c</a></h3>
<h3 id="information-2005mynxreadme.md">Information: <a
href="2005/mynx/README.md">2005/mynx/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
notes that, though probably obvious, this entry will not work with
https. He added an alt version that scans for https in case someone
wants to set up a pipeline or other workaround (perhaps with stunnel) or
even add additional code to it to make it work with https but the
problem otherwise is a secure connection has to first be set up in order
to give http commands. This is not a bug but it’s worth pointing out as
it won’t work on as many websites as it used to including the <a
href="https://www.ioccc.org">IOCCC website</a> itself.</p>
<h2 id="sykes">2005 sykes</h2>
<h3 id="status-inabiaf---please-do-not-fix-39">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2005sykessykes.c">Source code: <a
href="2005/sykes/sykes.c">2005/sykes/sykes.c</a></h3>
<h3 id="information-2005sykesreadme.md">Information: <a
href="2005/sykes/README.md">2005/sykes/README.md</a></h3>
<p>The author stated the below points of interest.</p>
<p>The machine emulated is an older 40 column one so 80 column programs
will not show up correctly.</p>
<p>There is no emulation of <a
href="https://en.wikipedia.org/wiki/Commodore_PET">PET</a> graphics
characters.</p>
<p>The parameter controls the speed of the 60Hz “jiffy clock”, and not
the processor speed. This means many games may run too fast to be usable
- it really depends on the speed of your machine.</p>
<p>Although the PET <a
href="https://en.wikipedia.org/wiki/Emulator">emulator</a> can do
<code>LOAD</code> and <code>SAVE</code>, it cannot <code>VERIFY</code>
or <code>OPEN</code> and <code>CLOSE</code> files.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Commodore_PET">PET</a>
hardware <a href="https://en.wikipedia.org/wiki/Emulator">emulation</a>
is not at all complete - features such as the hardware timers are
completely missing. Some programs will not run correctly.</p>
<p>The <a
href="https://en.wikipedia.org/wiki/MOS_Technology_6502#Technical_description">6502</a>
<a href="https://en.wikipedia.org/wiki/Emulator">emulation</a> does not
include the seldom used decimal mode, or any of the “undocumented”
instructions.</p>
<h1 id="section-22">2006</h1>
<h2 id="birken">2006 birken</h2>
<h3 id="status-uses-gets---change-to-fgets-if-possible-5">STATUS: uses
gets() - change to fgets() if possible</h3>
<h3 id="source-code-2006birkenbirken.c">Source code: <a
href="2006/birken/birken.c">2006/birken/birken.c</a></h3>
<h3 id="information-2006birkenreadme.md">Information: <a
href="2006/birken/README.md">2006/birken/README.md</a></h3>
<p>This entry uses <code>gets(3)</code> which is unsafe and provides
annoying warnings, most obnoxious in macOS as it shows it at runtime
(redirecting <code>stderr</code> to <code>/dev/null</code> will silence
it). The following diff will almost work but it crashes with at least
<code>computer.tofu</code> input file:</p>
<div class="sourceCode" id="cb67"><pre
class="sourceCode diff"><code class="sourceCode diff"><span id="cb67-1"><a href="#cb67-1" aria-hidden="true" tabindex="-1"></a><span class="dt">12a13</span></span>
<span id="cb67-2"><a href="#cb67-2" aria-hidden="true" tabindex="-1"></a>#define gets(c) fgets((c),PI,stdin)&amp;&amp;(((c)[strlen((c))-1]=&#39;\0&#39;),c!=NULL)</span></code></pre></div>
<h2 id="borsanyi">2006 borsanyi</h2>
<h3 id="status-inabiaf---please-do-not-fix-40">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2006borsanyiborsanyi.c">Source code: <a
href="2006/borsanyi/borsanyi.c">2006/borsanyi/borsanyi.c</a></h3>
<h3 id="information-2006borsanyireadme.md">Information: <a
href="2006/borsanyi/README.md">2006/borsanyi/README.md</a></h3>
<p>The string specified must be &lt;= 42 characters and may only consist
of the characters in the regex <code>a-z_A-Z0-9@.-</code>. Breaking
these constraints will end up with possibly corrupt GIF files.</p>
<h2 id="monge">2006 monge</h2>
<h3
id="status-doesnt-work-with-some-platforms---please-help-us-fix-4">STATUS:
doesn’t work with some platforms - please help us fix</h3>
<h3 id="source-code-2006mongemonge.c">Source code: <a
href="2006/monge/monge.c">2006/monge/monge.c</a></h3>
<h3 id="information-2006mongereadme.md">Information: <a
href="2006/monge/README.md">2006/monge/README.md</a></h3>
<p>This program requires x86 (with an x87 FPU) or x86_64 machine and it
requires the SDL1 library.</p>
<p>This program also requires being able to read, write and execute
memory. With the Apple silicon chips this is not allowed. Fixing this
might be quite challenging but you are welcome to try and fix it.</p>
<p>If you do fix this it might be good to fix the alternate code as well
or else 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!</p>
<h3 id="status-inabiaf---please-do-not-fix-41">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<p>Incorrect formulas will ungracefully crash the program.</p>
<h2 id="sykes1">2006 sykes1</h2>
<h3 id="status-inabiaf---please-do-not-fix-42">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2006sykes1sykes1.c">Source code: <a
href="2006/sykes1/sykes1.c">2006/sykes1/sykes1.c</a></h3>
<h3 id="information-2006sykes1readme.md">Information: <a
href="2006/sykes1/README.md">2006/sykes1/README.md</a></h3>
<p>The author stated:</p>
<pre><code>If you pick a number higher than 19186, the program will return a
solution but it will be a rotation of one of the first 19186. This is
because the cross shaped piece fits 48 ways in the 4x4 cube, but only
2 of those ways are unique - you can rotate one of those to make any
of the other 46. The algorithm used always places the cross piece
first, so the first two placings of that piece result in the 19186
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.</code></pre>
<h2 id="toledo2">2006 toledo2</h2>
<h3 id="status-inabiaf---please-do-not-fix-43">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2006toledo2toledo2.c">Source code: <a
href="2006/toledo2/toledo2.c">2006/toledo2/toledo2.c</a></h3>
<h3 id="information-2006toledo2readme.md">Information: <a
href="2006/toledo2/README.md">2006/toledo2/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed this program to not crash in macOS (it appeared to work fine in
fedora linux on an <code>x86_64</code> architecture but he does not know
if it crashed in macOS Ventura due to the fact it is an
<code>arm64</code> CPU - the Apple silicon chip). This fix, BTW, is a
mix of a fix by <a href="/authors.html#Yusuke_Endoh">Yusuke Endoh</a>
and Cody’s. Nevertheless there are two features that are not bugs. Later
the author made some slight changes to make it not crash in x86_64
macOS.</p>
<p>By design this program is supposed to crash on termination. This
actually no longer seems to happen but we don’t need this to be added
even if it might be called a bug :-)</p>
<p>You must type in caps (except in strings) and this program is indeed
case-sensitive.</p>
<h1 id="section-23">2007</h1>
<p>There was no IOCCC in 2007.</p>
<h1 id="section-24">2008</h1>
<p>There was no IOCCC in 2008.</p>
<h1 id="section-25">2009</h1>
<p>There was no IOCCC in 2009.</p>
<h1 id="section-26">2010</h1>
<p>There was no IOCCC in 2010.</p>
<h1 id="section-27">2011</h1>
<h2 id="borsanyi-1">2011 borsanyi</h2>
<h3 id="status-inabiaf---please-do-not-fix-44">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2011borsanyiborsanyi.c">Source code: <a
href="2011/borsanyi/borsanyi.c">2011/borsanyi/borsanyi.c</a></h3>
<h3 id="information-2011borsanyireadme.md">Information: <a
href="2011/borsanyi/README.md">2011/borsanyi/README.md</a></h3>
<p>For a great amount of data points the program will crash, depending
on your available stack space.</p>
<p>Giving too few (distinct) points can also cause a crash or division
by zero.</p>
<p>The program expects plain numbers separated by whitespace.</p>
<p>This program assumes ASCII.</p>
<p>If you give the program any arg it might flood the screen.</p>
<p>It requires both syscalls <code>fork(2)</code> and
<code>wait(2)</code>.</p>
<p>Giving any arg to the program is likely to flood your screen.</p>
<p>Rounding errors might cause an omission in the highest bin. There
might be empty bins at the edges.</p>
<h2 id="dlowe-2">2011 dlowe</h2>
<h3 id="status-missing-or-dead-link---please-provide-them-5">STATUS:
missing or dead link - please provide them</h3>
<h3 id="source-code-2011dlowedlowe.c">Source code: <a
href="2011/dlowe/dlowe.c">2011/dlowe/dlowe.c</a></h3>
<h3 id="information-2011dlowereadme.md">Information: <a
href="2011/dlowe/README.md">2011/dlowe/README.md</a></h3>
<p>The author’s website, http://www.pootpoot.net, no longer exists as it
once did, 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.</p>
<h3 id="status-inabiaf---please-do-not-fix-45">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<p>The author states the following:</p>
<ul>
<li><p>Bad input (e.g. nonexistent files, non-numeric number of
iterations, etc.) tends to result in empty output.</p></li>
<li><p>Given exactly one corpus, the program will crash or produce
garbage.</p></li>
<li><p>Leaks memory and file descriptors while processing
files.</p></li>
<li><p>Will crash and die horribly if it runs out of memory.</p></li>
</ul>
<p>If you want to try and fix this (mis)feature, you are welcome to
try.</p>
<h2 id="fredriksson">2011 fredriksson</h2>
<h3 id="status-inabiaf---please-do-not-fix-46">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2011fredrikssonfredriksson.c">Source code: <a
href="2011/fredriksson/fredriksson.c">2011/fredriksson/fredriksson.c</a></h3>
<h3 id="information-2011fredrikssonreadme.md">Information: <a
href="2011/fredriksson/README.md">2011/fredriksson/README.md</a></h3>
<p>The author stated that there are a number of features and
limitations. As the list is rather long see <a
href="2011/fredriksson/README.md#other-features">other features</a> and
<a href="2011/fredriksson/README.md#limitations-and-remarks">limitations
and remarks</a> instead.</p>
<h2 id="richards">2011 richards</h2>
<h3
id="status-doesnt-work-with-some-platforms---please-help-us-fix-5">STATUS:
doesn’t work with some platforms - please help us fix</h3>
<h3 id="source-code-2011richardsrichards.c">Source code: <a
href="2011/richards/richards.c">2011/richards/richards.c</a></h3>
<h3 id="information-2011richardsreadme.md">Information: <a
href="2011/richards/README.md">2011/richards/README.md</a></h3>
<p>This does not appear to work with macOS, resulting in a segfault (and
sometimes a bus error).</p>
<p>We’re not sure if this is to do with the Apple silicon chip or not
but it seems like it <em>might</em> (see Apple resources below) be but
it could also be a wider problem with macOS. It appears that Apple does
not allow certain combinations of memory protections with the arm64
processor.</p>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
tried some of the workarounds but at this time he could not get it to
work. He offers some earlier debugging sessions below as well as a
resource from the author as well as some resources on Apple’s website
should anyone wish to take a crack at it. He might address it later but
a starting point might be in <a
href="2011/richards/richards.alt.c">richards.alt.c</a>.</p>
<h3 id="debugging">Debugging</h3>
<p>At first glance it appeared to be that it might be the function
pointers or the fact it is trying to execute code in memory (as noted
above). The function pointers were changed a bit but this has not helped
solve the problem with macOS. A few things that were noticed depending
on <code>asan</code> sanitisers specified. With <code>address</code> in
linux:</p>
<pre><code>richards.c:101:9: runtime error: null pointer passed as argument 2, which is declared to never be null</code></pre>
<p>but it actually works. This code is:</p>
<div class="sourceCode" id="cb70"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span> <span class="cf">else</span></span>
<span id="cb70-2"><a href="#cb70-2" aria-hidden="true" tabindex="-1"></a> p<span class="op">++;</span></span>
<span id="cb70-3"><a href="#cb70-3" aria-hidden="true" tabindex="-1"></a> W<span class="op">(</span>c<span class="op">)}</span> <span class="co">/* LINE 101 */</span></span>
<span id="cb70-4"><a href="#cb70-4" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span></code></pre></div>
<p>Okay but what about argument 2? Well <code>W</code> is defined
as:</p>
<div class="sourceCode" id="cb71"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb71-1"><a href="#cb71-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define W</span><span class="op">(</span><span class="pp">c</span><span class="op">)</span><span class="pp"> e</span><span class="op">=</span><span class="pp">memmove</span><span class="op">(</span><span class="pp">e</span><span class="op">,</span><span class="pp">x</span><span class="op">[(</span>u<span class="op">)</span><span class="pp">c</span><span class="op">],</span><span class="pp"> y</span><span class="op">[(</span>u<span class="op">)</span><span class="pp">c</span><span class="op">])+</span><span class="pp">y</span><span class="op">[(</span>u<span class="op">)</span><span class="pp">c</span><span class="op">];</span></span></code></pre></div>
<p>so it would appear that</p>
<div class="sourceCode" id="cb72"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb72-1"><a href="#cb72-1" aria-hidden="true" tabindex="-1"></a>x<span class="op">[(</span>u<span class="op">)</span>c<span class="op">]</span></span></code></pre></div>
<p>(at least in my tired head?) is NULL. But why does it work then?</p>
<p>NOTE: <code>u</code> is <code>int</code>.</p>
<p>Under macOS (with the arm64 chip) we get:</p>
<pre><code>UndefinedBehaviorSanitizer:DEADLYSIGNAL
==10834==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0xffffffffffffffff (pc 0x00019f446748 bp 0x00016f353100 sp 0x00016f352b90 T139066)
==10834==The signal is caused by a WRITE memory access.
#0 0x19f446748 in _platform_memmove+0xa8 (libsystem_platform.dylib:arm64e+0x3748) (BuildId: 756cd10d62a032839e57cbaa810c95ac32000000200000000100000000030d00)
#1 0x100c33c2c in main richards.c:202
#2 0x19f0bff24 (&lt;unknown module&gt;)
==10834==Register values:
x[0] = 0xffffffffffffffff x[1] = 0x0000000100ab18c1 x[2] = 0x00000000000000cf x[3] = 0x0000000000000000
x[4] = 0x0000000100ab18a1 x[5] = 0x0000000000000001 x[6] = 0x000000000000000a x[7] = 0x0000000000000000
x[8] = 0x00000001015972b8 x[9] = 0xffffffffffffffff x[10] = 0x0000000000000001 x[11] = 0x00000000000001f0
x[12] = 0x0000000000000001 x[13] = 0x00000000000003e0 x[14] = 0x0000000000000001 x[15] = 0x0000000000000084
x[16] = 0x000000019f4466a0 x[17] = 0x00000001ff3ad908 x[18] = 0x0000000000000000 x[19] = 0x0000000100c32a80
x[20] = 0x00000001017e0000 x[21] = 0x00000001017e1910 x[22] = 0x000000016f353530 x[23] = 0x000000019f13a366
x[24] = 0x000000016f3534b0 x[25] = 0x0000000000000001 x[26] = 0x0000000000000000 x[27] = 0x0000000000000000
x[28] = 0x0000000000000000 fp = 0x000000016f353100 lr = 0x0000000100aaf880 sp = 0x000000016f352b90
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV (libsystem_platform.dylib:arm64e+0x3748) (BuildId: 756cd10d62a032839e57cbaa810c95ac32000000200000000100000000030d00) in _platform_memmove+0xa8
==10834==ABORTING</code></pre>
<p>and naturally it does not work.</p>
<p>Adding the proper <code>PROT_WRITE</code> constant to the
<code>mmap()</code> call does not seem to help. Of course with the
address this is not surprising so why is a different address allocated
in macOS? Or is it?</p>
<p>Now with <code>address</code> sanitiser both linux and macOS crash
at:</p>
<pre><code>=================================================================
==10983==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00016f8d5e78 at pc 0x0001005dd910 bp 0x00016f8d5cd0 sp 0x00016f8d5cc8
READ of size 8 at 0x00016f8d5e78 thread T0
#0 0x1005dd90c in rd richards.c:132
#1 0x1005ddf8c in re richards.c:149
#2 0x1005110a0 in t richards.c:108
#3 0x1005df72c in main richards.c:189
#4 0x19f0bff24 (&lt;unknown module&gt;)
Address 0x00016f8d5e78 is located in stack of thread T0 at offset 56 in frame
#0 0x1005dd678 in rd richards.c:129
This frame has 2 object(s):
[32, 36) &#39;v.addr&#39;
[48, 56) &#39;a&#39; (line 130) &lt;== Memory access at offset 56 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow richards.c:132 in rd
Shadow bytes around the buggy address:
0x00702df3ab70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3ab80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3ab90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3aba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3abb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=&gt;0x00702df3abc0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 00[f3]
0x00702df3abd0: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3abe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3abf0: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00
0x00702df3ac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00702df3ac10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==10983==ABORTING
/bin/bash: line 1: 10983 Abort trap: 6 ./richards</code></pre>
<p>which corresponds to the code:</p>
<div class="sourceCode" id="cb75"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb75-1"><a href="#cb75-1" aria-hidden="true" tabindex="-1"></a>o rd<span class="op">(</span>u v<span class="op">)</span></span>
<span id="cb75-2"><a href="#cb75-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
<span id="cb75-3"><a href="#cb75-3" aria-hidden="true" tabindex="-1"></a> o <span class="op">*</span>a <span class="op">=</span> <span class="dv">0</span><span class="op">,</span> <span class="op">**</span>b <span class="op">=</span> <span class="op">&amp;</span>a<span class="op">,</span> <span class="op">**</span>c <span class="op">=</span> b <span class="op">+</span> <span class="dv">32</span><span class="op">;</span></span>
<span id="cb75-4"><a href="#cb75-4" aria-hidden="true" tabindex="-1"></a> x<span class="op">[</span>v<span class="op">]</span> <span class="op">=</span> w<span class="op">;</span></span>
<span id="cb75-5"><a href="#cb75-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> <span class="op">(;</span> b <span class="op">&lt;</span> c <span class="op">&amp;&amp;</span> <span class="op">(*</span>b <span class="op">&lt;</span> <span class="op">(</span>o <span class="op">*)</span>w <span class="op">||</span> <span class="op">*</span>b <span class="op">&gt;</span> <span class="op">(</span>o <span class="op">*)</span> T <span class="op">||</span> <span class="op">*</span>b <span class="op">==</span> <span class="op">&amp;</span>v<span class="op">);</span> b<span class="op">++);</span> <span class="co">/* LINE 132 */</span></span></code></pre></div>
<p>but this seems to not necessarily be relevant since without it it
works in linux.</p>
<p>A warning of interest when compiling is:</p>
<pre><code>
richards.c:169:15: warning: incompatible pointer types initializing &#39;f *&#39; (aka &#39;void (**)(volatile void *)&#39;) with an expression of type &#39;o ()&#39; (aka &#39;void ()&#39;) [-Wincompatible-pointer-types]
f *lib1[] = { T, T, T, T, T } ;
...
richards.c:170:15: warning: incompatible pointer types initializing &#39;f *&#39; (aka &#39;void (**)(volatile void *)&#39;) with an expression of type &#39;o ()&#39; (aka &#39;void ()&#39;) [-Wincompatible-pointer-types]
f *lib2[] = { T, ld, lp, lx, l1 } ;
^
richards.c:170:18: warning: incompatible pointer types initializing &#39;f *&#39; (aka &#39;void (**)(volatile void *)&#39;) with an expression of type &#39;void (volatile dt)&#39; (aka &#39;void (struct (unnamed at richards.c:36:3) *volatile)&#39;) [-Wincompatible-pointer-types]
f *lib2[] = { T, ld, lp, lx, l1 } ;
^~
richards.c:170:22: warning: incompatible pointer types initializing &#39;f *&#39; (aka &#39;void (**)(volatile void *)&#39;) with an expression of type &#39;void (volatile dt)&#39; (aka &#39;void (struct (unnamed at richards.c:36:3) *volatile)&#39;) [-Wincompatible-pointer-types]
f *lib2[] = { T, ld, lp, lx, l1 } ;
^~
richards.c:170:26: warning: incompatible pointer types initializing &#39;f *&#39; (aka &#39;void (**)(volatile void *)&#39;) with an expression of type &#39;void (volatile dt)&#39; (aka &#39;void (struct (unnamed at richards.c:36:3) *volatile)&#39;) [-Wincompatible-pointer-types]
f *lib2[] = { T, ld, lp, lx, l1 } ;
^~
richards.c:170:30: warning: incompatible pointer types initializing &#39;f *&#39; (aka &#39;void (**)(volatile void *)&#39;) with an expression of type &#39;void (volatile dt)&#39; (aka &#39;void (struct (unnamed at richards.c:36:3) *volatile)&#39;) [-Wincompatible-pointer-types]
f *lib2[] = { T, ld, lp, lx, l1 } ;
^~</code></pre>
<p>This can be fixed easily enough however but it doesn’t appear to
matter in this case.</p>
<h3 id="testing-fixes">Testing fixes</h3>
<p>It might be helpful to use the <a
href="/2011/richards/try.alt.sh">try.alt.sh</a> script to test that it
does not crash and functions properly.</p>
<h3 id="resources">Resources</h3>
<h4 id="more-from-the-author">More from the author</h4>
<p>The author has more about the entry at <a
href="https://github.com/GregorR/ioccc2011"
class="uri">https://github.com/GregorR/ioccc2011</a>.</p>
<h4 id="apple-resources">Apple resources</h4>
<p><a
href="https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon?language=objc">Porting
Just-In-Time Compilers to Apple Silicon</a></p>
<p><a
href="https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-jit?language=objc">Allow
Execution of JIT-compiled Code Entitlement</a></p>
<p>Looking at <a
href="https://github.com/apple/darwin-xnu/blob/5394bb038891708cd4ba748da79b90a33b19f82e/bsd/kern/kern_mman.c"
class="uri">https://github.com/apple/darwin-xnu/blob/5394bb038891708cd4ba748da79b90a33b19f82e/bsd/kern/kern_mman.c</a>
Cody noticed a curious thing in the <code>mprotect()</code> function:
<code>#if CONFIG_DYNAMIC_CODE_SIGNING</code> and the protection variable
has the <code>VM_PROT_TRUSTED</code> set it might allow overriding the
problem but this is unconfirmed and it’s not known when
<code>CONFIG_DYNAMIC_CODE_SIGNING</code> would be defined.</p>
<p>Do you have a fix? We welcome it!</p>
<h2 id="vik">2011 vik</h2>
<h3 id="status-inabiaf---please-do-not-fix-47">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2011vikvik.c">Source code: <a
href="2011/vik/vik.c">2011/vik/vik.c</a></h3>
<h3 id="information-2011vikreadme.md">Information: <a
href="2011/vik/README.md">2011/vik/README.md</a></h3>
<p>The author stated that the program will crash if no argument is
passed to the program though we note that your computer might also <a
href="https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)">halt
and catch fire</a> :-)</p>
<h1 id="section-28">2012</h1>
<h2 id="blakely">2012 blakely</h2>
<h3 id="status-inabiaf---please-do-not-fix-48">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2012blakelyblakely.c">Source code: <a
href="2012/blakely/blakely.c">2012/blakely/blakely.c</a></h3>
<h3 id="information-2012blakelyreadme.md">Information: <a
href="2012/blakely/README.md">2012/blakely/README.md</a></h3>
<p>The author stated:</p>
<pre><code>If there is a division by zero, square-root of a negative number, or similar
operation, then the results are undefined.</code></pre>
<h2 id="deckmyn">2012 deckmyn</h2>
<h3 id="status-inabiaf---please-do-not-fix-49">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2012deckmyndeckmyn.c">Source code: <a
href="2012/deckmyn/deckmyn.c">2012/deckmyn/deckmyn.c</a></h3>
<h3 id="information-2012deckmynreadme.md">Information: <a
href="2012/deckmyn/README.md">2012/deckmyn/README.md</a></h3>
<p>The author stated:</p>
<pre><code>The memory locations of `argv` are used for various purposes. Therefore, the
program name (default `deckmyn`) must be *at least 4 characters long*, including
possibly the path. This, along with the ending `&#39;\0&#39;`, gives a minimum 5 bytes of
useful memory space. Otherwise, the program may attempt to write outside the
string.
The code is quite sensitive. Errors in the input can lead to strange results.
The code does not read beyond the end of the music input, but that is about the
only error checking available. Any input that is not according to the rules in
the deckmyn.md, may cause errors.
The program has no special hardware limitations or requirements, other than 8bit
`char` (`signed` or `unsigned`) and two&#39;s complement negatives.
The limitations of using `char` as counters for e.g. the number of music staves
are minor. 127 staves to a page is rather a lot.
The file layout must be exactly the same as deckmyn.c though, only the locations
of space (`&quot; &quot;`) may differ.
Every element in the music is given by a string of *exactly* 3 characters. Any
violation of this will result in the rest of the music being interpreted in some
randomly wrong way. Notice that in a file, the newline is also a character!
Therefore, when preparing music in a file, care should be taken that the last
musical element of a line is only 2 characters!</code></pre>
<p>The manual referred to is <a
href="2012/deckmyn/deckmyn.md">here</a>.</p>
<h2 id="dlowe-3">2012 dlowe</h2>
<h3 id="status-inabiaf---please-do-not-fix-50">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2012dlowedlowe.c">Source code: <a
href="2012/dlowe/dlowe.c">2012/dlowe/dlowe.c</a></h3>
<h3 id="information-2012dlowereadme.md">Information: <a
href="2012/dlowe/README.md">2012/dlowe/README.md</a></h3>
<p>The author stated:</p>
<ul>
<li>Flicker, especially at high speeds, and in spite of
“double-buffering” (X11 doesn’t make it possible to lock drawing to the
display refresh rate.)</li>
<li>Cannot be run outside of the directory containing the data files
(<code>splash.d</code>, <code>dead.d</code> and
<code>sprites.d</code>).</li>
<li>Cannot build or run without X11 (or an X11 compatibility
layer).</li>
</ul>
<h2 id="tromp">2012 tromp</h2>
<h3 id="status-inabiaf---please-do-not-fix-51">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2012tromptromp.c">Source code: <a
href="2012/tromp/tromp.c">2012/tromp/tromp.c</a></h3>
<h3 id="information-2012trompreadme.md">Information: <a
href="2012/tromp/README.md">2012/tromp/README.md</a></h3>
<p>The author stated:</p>
<pre><code>If the input doesn&#39;t start with a valid program, that is,
if the interpreter reaches end-of-file during program parsing,
it will crash in some way. E.g. the following might dump core:
echo -n &quot;U&quot; | ./tromp
Furthermore, the interpreter requires the initial encoded lambda term to be closed,
that is, variable n can only appear within at least &#39;n&#39; enclosing lambdas.
For instance, here the term &#39;\ 5&#39; is not closed, causing the interpreter to crash when
looking into a null-pointer environment:
echo &quot;&gt;Hello, world&quot; | ./tromp
will likely dump core.
</code></pre>
<h2 id="vik-1">2012 vik</h2>
<h3 id="status-inabiaf---please-do-not-fix-52">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2012vikvik.c">Source code: <a
href="2012/vik/vik.c">2012/vik/vik.c</a></h3>
<h3 id="information-2012vikreadme.md">Information: <a
href="2012/vik/README.md">2012/vik/README.md</a></h3>
<p>The author stated that the program will crash if no argument is
passed to the program or if invalid arguments (e.g. file does not exist)
or images of mismatching sizes or unsupported pixel formats though we
note that your computer might also <a
href="https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)">halt
and catch fire</a> :-)</p>
<h1 id="section-29">2013</h1>
<h2 id="cable2">2013 cable2</h2>
<h3 id="status-inabiaf---please-do-not-fix-53">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013cable2cable2.c">Source code: <a
href="2013/cable2/cable2.c">2013/cable2/cable2.c</a></h3>
<h3 id="information-2013cable2readme.md">Information: <a
href="2013/cable2/README.md">2013/cable2/README.md</a></h3>
<p>The author stated:</p>
<ul>
<li>The width of input images must be a multiple of 4.</li>
<li>Input images can be 8-bit greyscale, 24-bit color or 32-bit color
only. 8-bit color and 16-bit color are not supported. If you use the
“color” command-line feature, do not use a greyscale input file!</li>
<li>Normal Windows BMP files are stored “upside-down”, i.e. the bottom
line in the image is written first. Some (old) graphics programs
actually write BMP files “top-to-bottom” and the program does not
support such files.</li>
<li>Using anti-aliased brush strokes to draw your letters is fine;
however, antialiasing interferes with color detection in “color”
mode.</li>
<li>Only runs on little endian machines (since the BMP format is little
endian, and endianness conversion would make the source too large for
IOCCC rule 2).</li>
</ul>
<h2 id="dlowe-4">2013 dlowe</h2>
<h3 id="status-inabiaf---please-do-not-fix-54">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013dlowedlowe.c">Source code: <a
href="2013/dlowe/dlowe.c">2013/dlowe/dlowe.c</a></h3>
<h3 id="information-2013dlowereadme.md">Information: <a
href="2013/dlowe/README.md">2013/dlowe/README.md</a></h3>
<p>This program will possibly crash or draw something strange with 0
args. Then again it might not. :-) This is easy to fix but would add
bytes and since the author noted it is a feature and not a bug. You of
course can try and fix it yourself but please do NOT open a pull request
for this: just do it as an exercise to see if you understand the
code.</p>
<p>You can try and answer the questions, too: when will it crash? When
will it draw something funny (or will it? :-) ) and when will it just do
nothing?</p>
<p>The author also stated:</p>
<ul>
<li>Produces bogus graphs when given &gt; about 5000 arguments.</li>
<li>Only works if your terminal is UTF-8 and your font supports the 8
glyphs used.</li>
</ul>
<h2 id="endoh1">2013 endoh1</h2>
<h3 id="status-inabiaf---please-do-not-fix-55">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013endoh1endoh1.c">Source code: <a
href="2013/endoh1/endoh1.c">2013/endoh1/endoh1.c</a></h3>
<h3 id="information-2013endoh1readme.md">Information: <a
href="2013/endoh1/README.md">2013/endoh1/README.md</a></h3>
<p>From the author:</p>
<p>–</p>
<p>This program supports only “Combinator-calculus style notation” of
Lazy K. “Unlambda style” and “Iota and Jot” style are not supported.</p>
<p>Also, it requires a space between identifiers. In short, use
<code>(S K)</code> instead of <code>(SK)</code>, “`sk”,
<code>**i*i*i*ii*i*i*ii</code>, or <code>11111100011100</code>.</p>
<p>Huge memory may be required to compile the program (about 300 MB on
my machine).</p>
<p>In addition, there are some limitations (and workarounds) mentioned
in <a href="2013/endoh1/README.md#spoiler">Spoiler section</a>.</p>
<p>–</p>
<h2 id="endoh3">2013 endoh3</h2>
<h3 id="status-inabiaf---please-do-not-fix-56">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013endoh3endoh3.c">Source code: <a
href="2013/endoh3/endoh3.c">2013/endoh3/endoh3.c</a></h3>
<h3 id="information-2013endoh3readme.md">Information: <a
href="2013/endoh3/README.md">2013/endoh3/README.md</a></h3>
<p>From the author:</p>
<p>–</p>
<p>You can <em>NOT</em> write a note length immediately followed by a
note <code>E</code>, such as <code>C2E2</code>.</p>
<p>Can you figure out why?</p>
<p>A workaround is inserting a whitespace: <code>C2 E2</code>.</p>
<p>–</p>
<h2 id="endoh4">2013 endoh4</h2>
<h3 id="status-inabiaf---please-do-not-fix-57">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013endoh4endoh4.c">Source code: <a
href="2013/endoh4/endoh4.c">2013/endoh4/endoh4.c</a></h3>
<h3 id="information-2013endoh4readme.md">Information: <a
href="2013/endoh4/README.md">2013/endoh4/README.md</a></h3>
<p>Invalid input files will very likely crash the program.</p>
<h2 id="hou">2013 hou</h2>
<h3 id="status-inabiaf---please-do-not-fix-58">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013houhou.c">Source code: <a
href="2013/hou/hou.c">2013/hou/hou.c</a></h3>
<h3 id="information-2013houreadme.md">Information: <a
href="2013/hou/README.md">2013/hou/README.md</a></h3>
<p>This program will not terminate on its own; you must kill
<code>hou</code> (but not Qiming Hou :-) ) yourself. This should not be
fixed.</p>
<h2 id="mills">2013 mills</h2>
<h3 id="status-inabiaf---please-do-not-fix-59">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2013millsmills.c">Source code: <a
href="2013/mills/mills.c">2013/mills/mills.c</a></h3>
<h3 id="information-2013millsreadme.md">Information: <a
href="2013/mills/README.md">2013/mills/README.md</a></h3>
<p>The author reminds us that if you kill the program you will have to
wait a short bit of time before you can start it again if you want it to
be able to bind to the socket (which obviously you do). The source is
out the scope of this document but the author does mention the well
known (at least to those of us who 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.</p>
<h1 id="section-30">2014</h1>
<h2 id="maffiodo1">2014 maffiodo1</h2>
<h3 id="status-inabiaf---please-do-not-fix-60">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2014maffiodo1prog.c">Source code: <a
href="2014/maffiodo1/prog.c">2014/maffiodo1/prog.c</a></h3>
<h3 id="information-2014maffiodo1readme.md">Information: <a
href="2014/maffiodo1/README.md">2014/maffiodo1/README.md</a></h3>
<p>The author noted that in macOS the colours might be wrong. They gave
a solution. However Cody didn’t see any problem with it and he beat the
series many times. Of course the game here is small and he’s practically
blind and it’s been a while since he last played so it might be wrong.
Nevertheless the author does give a way to reconfigure the colours.</p>
<p>The author noted that the character cannot go through walls and the
impression is that this is how it was believed but Cody ironically
pointed out that there are known glitches where in some places you
actually could go through walls. This might even have applied to the
arcade version, Mario Bros, though that can no longer be confirmed by
Cody. The point here is that in this game you cannot go through walls
but it’s not a bug.</p>
<p>On the other hand, the author also stated:</p>
<p>–</p>
<p>When the <code>Super character</code> becomes bigger
(<code>ZOOM</code> flag), the character can collide with blocks and get
stuck inside them. This is a KNOWN BUG. When your player become bigger,
stay away from blocks!</p>
<p>–</p>
<p>but since it’s documented it’s considered a feature, not a bug to
fix.</p>
<h2 id="maffiodo2">2014 maffiodo2</h2>
<h3 id="status-inabiaf---please-do-not-fix-61">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2014maffiodo2prog.c">Source code: <a
href="2014/maffiodo2/prog.c">2014/maffiodo2/prog.c</a></h3>
<h3 id="information-2014maffiodo2readme.md">Information: <a
href="2014/maffiodo2/README.md">2014/maffiodo2/README.md</a></h3>
<p>This program will very likely crash if no arg is given.</p>
<h2 id="vik-2">2014 vik</h2>
<h3 id="status-known-bug---please-help-us-fix-14">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-2014vikprog.c">Source code: <a
href="2014/vik/prog.c">2014/vik/prog.c</a></h3>
<h3 id="information-2014vikreadme.md">Information: <a
href="2014/vik/README.md">2014/vik/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
discovered a bug to do with translating sound to text that shows itself
in some cases (it works in others) when working on his winning <a
href="2020/ferguson2/prog.c">2020 Enigma machine</a> (‘Most enigmatic’)
entry. See his <a href="2020/ferguson2/README.md">README.md</a> for
details (search for <code>vik</code> in the file). This one might be
more of a limitation but this is not known.</p>
<p>He provides a tip in testing the problem: it might help to use his
Enigma machine to find problems as it will allow you to verify what is
correct and what is not. Again see his README.md for details. However it
is also possible to not rely on the entry as the below shows. One should
be able to do:</p>
<div class="sourceCode" id="cb80"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb80-1"><a href="#cb80-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&#39;No. I want chocolate!&#39;</span> <span class="kw">|</span> <span class="ex">./prog</span> <span class="op">&gt;</span> chocolate.raw</span>
<span id="cb80-2"><a href="#cb80-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb80-3"><a href="#cb80-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> e <span class="op">&lt;</span> chocolate.raw</span></code></pre></div>
<p>and get:</p>
<pre><code>No. I want some chocolate!</code></pre>
<p>but instead we get:</p>
<pre><code>IT FHOCOLITE!</code></pre>
<p>which is very wrong. If however one does:</p>
<pre><code>echo IOCCC | ./prog &gt; ioccc.raw
./prog e &lt; ioccc.raw</code></pre>
<p>they will properly get:</p>
<pre><code>IOCCC</code></pre>
<h1 id="section-31">2015</h1>
<h2 id="hou-1">2015 hou</h2>
<h3 id="status-inabiaf---please-do-not-fix-62">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2015houprog.c">Source code: <a
href="2015/hou/prog.c">2015/hou/prog.c</a></h3>
<h3 id="information-2015houreadme.md">Information: <a
href="2015/hou/README.md">2015/hou/README.md</a></h3>
<p>The author stated:</p>
<p>–</p>
<p>Hard requirements:</p>
<ul>
<li><p>The platform must implement the <code>double</code> type as
IEEE754-compliant 64-bit floating point numbers. The 80-bit intermediate
format used by x87 is considered as an violation of this. The code
should print an error message on such platforms.</p></li>
<li><p>The program must start with the CPU / FPU in round-to-nearest
mode.</p></li>
</ul>
<p>Soft requirements:</p>
<ul>
<li><p>The compiler must respect <code>volatile</code>. The code is
formatted to warn about that, though.</p></li>
<li><p>The printed result is only correct on little-endian machines. The
program takes care to warn about this issue after printing an incorrect
big-endian result. Error messages become garbled, though.</p></li>
</ul>
<p>–</p>
<h2 id="mills2">2015 mills2</h2>
<h3 id="status-inabiaf---please-do-not-fix-63">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2015mills2prog.c">Source code: <a
href="2015/mills2/prog.c">2015/mills2/prog.c</a></h3>
<h3 id="information-2015mills2readme.md">Information: <a
href="2015/mills2/README.md">2015/mills2/README.md</a></h3>
<p>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.</p>
<p>The program depends on little endian systems.</p>
<h2 id="schweikhardt">2015 schweikhardt</h2>
<h3 id="status-inabiaf---please-do-not-fix-64">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2015schweikhardtprog.c">Source code: <a
href="2015/schweikhardt/prog.c">2015/schweikhardt/prog.c</a></h3>
<h3 id="information-2015schweikhardtreadme.md">Information: <a
href="2015/schweikhardt/README.md">2015/schweikhardt/README.md</a></h3>
<p>The program assumes that <code>EOF</code> is <code>-1</code>. This
can be fixed but at this time it is uncertain if it should be.</p>
<p>The author also stated:</p>
<p>–</p>
<p>While the program works best when bytes/characters are octets and the
number of bits in a type is <code>sizeof(typ) &lt;&lt; 3</code>, it will
work correctly on 24-bit or 36-bit systems with 9 bits/byte, or systems
where <code>sizeof(typ)</code> is 1 even for <code>int</code> and so on.
On such systems, it will only use <code>8 * sizeof(typ)</code> bits per
place. It does not work when <code>CHAR_BIT &lt;= 7</code>.</p>
<p>–</p>
<h1 id="section-32">2016</h1>
<p>There was no IOCCC in 2016.</p>
<h1 id="section-33">2017</h1>
<p>There was no IOCCC in 2017.</p>
<h1 id="section-34">2018</h1>
<h2 id="algmyr">2018 algmyr</h2>
<h3 id="status-inabiaf---please-do-not-fix-65">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2018algmyralgmyr.c">Source code: <a
href="2018/algmyr/algmyr.c">2018/algmyr/algmyr.c</a></h3>
<h3 id="information-2018algmyrreadme.md">Information: <a
href="2018/algmyr/README.md">2018/algmyr/README.md</a></h3>
<p>The author wrote:</p>
<ul>
<li>There is no error checking done when opening files, so expect
segfaults if you provide the wrong path to a file.</li>
<li>This program is bound to misbehave if <code>int</code> is less than
32 bits.</li>
<li>Flags will only be interpreted correctly if they are the first
argument. Reading a file named <code>-d</code> or <code>-h</code> is
fully possible if it is not the first file provided, even though I am
not sure why you would want to do that.</li>
<li>Providing invalid/unexpected arguments to the decode flag will
result in odd behavior. Some erroneous arguments cause segfaults
(negative number of channels, channel id outside valid range). One
argument in particular causes an infinite loop printing whitespace.</li>
</ul>
<h2 id="hou-2">2018 hou</h2>
<h3 id="status-inabiaf---please-do-not-fix-66">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2018houprog.c">Source code: <a
href="2018/hou/prog.c">2018/hou/prog.c</a></h3>
<h3 id="information-2018houreadme.md">Information: <a
href="2018/hou/README.md">2018/hou/README.md</a></h3>
<p>When you run it on a JSON file you will see something like:</p>
<div class="sourceCode" id="cb85"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./prog <span class="op">&lt;</span> ioccc.json <span class="op">&gt;</span> ioccc.html</span>
<span id="cb85-2"><a href="#cb85-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Assertion</span> failed: <span class="er">(</span><span class="ex">rulez</span><span class="kw">)</span><span class="ex">,</span> function C, file prog.c, line 124.</span>
<span id="cb85-3"><a href="#cb85-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Abort</span> trap: 6</span></code></pre></div>
<p>(from say running
<code>./try.sh) but this is expected and the file</code>ioccc.html` will
be generated properly.</p>
<p>Some JSON files might cause the program to continue to run and
seemingly infinitely increase the size of the output file. This can
happen if you try fixing the syntax error in the generated
<code>ioccc.json</code> file.</p>
<h2 id="mills-1">2018 mills</h2>
<h3 id="status-known-bug---please-help-us-fix-15">STATUS: known bug -
please help us fix</h3>
<h3 id="source-code-2018millsprog.c">Source code: <a
href="2018/mills/prog.c">2018/mills/prog.c</a></h3>
<h3 id="information-2018millsreadme.md">Information: <a
href="2018/mills/README.md">2018/mills/README.md</a></h3>
<p>After exiting the program (with ctrl-e) if you try running it again
you will likely see:</p>
<pre><code>&gt;bootT5pw
]h_ 8D3[]</code></pre>
<p>where <code>[]</code> 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 <code>prog</code> again it’ll be okay.</p>
<h3 id="status-inabiaf---please-do-not-fix-67">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<p>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.</p>
<p>The author also stated that it is possible to corrupt the virtual
disk. If you do this you should type <code>make clobber all</code> and
try again.</p>
<p>Cody caused a funny problem where it showed <code>ERROR</code> after
each command. The solution was to hit ctrl-e and start again. He does
not know if this is what was referred to by the author but there was
likely no typo involved.</p>
<p>Cody notes that if you are using the saved mode you must type
<code>sync</code> prior to 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).</p>
<h2 id="vokes">2018 vokes</h2>
<h3 id="status-inabiaf---please-do-not-fix-68">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2018vokesvokes.c">Source code: <a
href="2018/vokes/vokes.c">2018/vokes/vokes.c</a></h3>
<h3 id="information-2018vokesreadme.md">Information: <a
href="2018/vokes/README.md">2018/vokes/README.md</a></h3>
<p>The author wrote the following:</p>
<ul>
<li><p>Despite appearances, it does not handle numbers in hex, or
provide a <code>curses(3)</code>-based interface.</p></li>
<li><p>The expected input format is zero or more lines of
space-separated integers. If other characters appear in the input, it
will either reject the input entirely and exit with a non-zero status,
or skip number(s) adjacent to the non-digit characters, depending on
where the characters appear. Tabs and multiple consecutive spaces are
handled correctly, however.</p></li>
<li><p>Individual lines of input longer than <code>0x3543 - 1</code>
bytes will be split and processed as if they were multiple lines of
input, which can produce incorrect results. This magic number’s
significance is described earlier.</p></li>
<li><p>The algorithm expects its input to represent a fully connected
graph. While the output is otherwise topologically sorted, if there are
nodes completely unconnected to the rest of the graph (with or without
self-cycles), they will be output as soon as they are processed – this
means that, when there are disconnected nodes, reordering the input
lines can produce different output. Addressing this by adding another
pass is would put the program over the size limit.</p></li>
<li><p>While the node IDs don’t need to be consecutive or start at 0,
the implementation doesn’t have special handling for sparse graphs. If
you give it a graph with nodes numbered 0 and 2147483647, it will
attempt to allocate sufficient memory (potentially around 32 GB) for the
entire range of graph nodes, even if those are the only ones. If memory
allocation returns NULL, it will gracefully exit, otherwise it will
succeed, eventually, perhaps after a great deal of swapping.</p></li>
<li><p>Node IDs &gt;= 2147483648 will cause the program to print an
error message and exit with a non-zero status. This shrinks the code
that detects overflowing the array size by a bit.</p></li>
<li><p>A very large group of nodes in a cycle can cause a stack
overflow. This typically takes over 100,000 nodes, and depends on the
order the nodes are visited. Addressing this would put the program over
the size limit.</p></li>
<li><p>The implementation depends on the characters <code>'0'</code>,
<code>'1'</code>, … <code>'9'</code> having the values <code>48</code>
through <code>57</code>, rather than using <code>isdigit(3)</code>. As
noted above, this program has nothing to do with a hand.</p></li>
</ul>
<h1 id="section-35">2019</h1>
<h2 id="adamovsky">2019 adamovsky</h2>
<h3 id="status-inabiaf---please-do-not-fix-69">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019adamovskyprog.c">Source code: <a
href="/2019/adamovsky/prog.c">2019/adamovsky/prog.c</a></h3>
<h3 id="information-2019adamovskyreadme.md">Information: <a
href="/2019/adamovsky/README.md">2019/adamovsky/README.md</a></h3>
<p>Certain input can crash this program. The file <a
href="/2019/adamovsky/crash.unl">crash.unl</a> is an example file.</p>
<h2 id="burton">2019 burton</h2>
<h3 id="status-inabiaf---please-do-not-fix-70">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019burtonprog.c">Source code: <a
href="2019/burton/prog.c">2019/burton/prog.c</a></h3>
<h3 id="information-2019burtonreadme.md">Information: <a
href="2019/burton/README.md">2019/burton/README.md</a></h3>
<p>The author pointed out that some implementations of
<code>wc(1)</code> show different values but his implementation matches
that of macOS and FreeBSD.</p>
<h2 id="ciura">2019 ciura</h2>
<h3 id="status-inabiaf---please-do-not-fix-71">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019ciuraprog.c">Source code: <a
href="2019/ciura/prog.c">2019/ciura/prog.c</a></h3>
<h3 id="information-2019ciurareadme.md">Information: <a
href="2019/ciura/README.md">2019/ciura/README.md</a></h3>
<p><a href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a>
fixed the scripts so that they can work but it might end up that the
scripts don’t show any output anyway as they use the full alphabet. To
test that it works one can have a script like:</p>
<div class="sourceCode" id="cb87"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb87-1"><a href="#cb87-1" aria-hidden="true" tabindex="-1"></a><span class="va">LC_ALL</span><span class="op">=</span>C <span class="ex">aäbcdefghijklmnoöpqrsßtuüvwxyz</span> <span class="kw">|</span> <span class="va">LC_ALL</span><span class="op">=</span>C <span class="fu">grep</span> .. <span class="kw">|</span> <span class="va">LC_ALL</span><span class="op">=</span>de_DE.UTF-8 <span class="ex">./prog</span> aäbcdefghijklmnoöpqrsßtuüvwxyz</span></code></pre></div>
<p>If you run this you should see:</p>
<pre><code>aäbcdefghijklmnoöpqrsßtuüvwxyz</code></pre>
<p>which shows it works. However as the de.sh script refers to all
letters it can’t find a perfect pangram. BTW, as far as the question of
whether the umlaut letters or the Eszett are considered letters in the
German alphabet, Cody noted in the de.sh/de.alt.sh scripts:</p>
<pre><code># Are the umlauts ä, ö, ü and Eszett (ß) letters in the German alphabet? There
# is more than one opinion on the subject but a lot of words do have an umlaut
# (or Umlaut in German). In some (probably all) systems this script outputs
# nothing probably because it&#39;s very hard to form a perfect pangram in German,
# if it&#39;s not impossible. Nevertheless, we do include the other characters
# whether or not they are in your view considered part of the alphabet for the
# reason that so many words have them.</code></pre>
<h2 id="dogon">2019 dogon</h2>
<h3 id="status-uses-gets---change-to-fgets-if-possible-6">STATUS: uses
gets() - change to fgets() if possible</h3>
<h3 id="source-code-2019dogonprog.c">Source code: <a
href="2019/dogon/prog.c">2019/dogon/prog.c</a></h3>
<h3 id="information-2019dogonreadme.md">Information: <a
href="2019/dogon/README.md">2019/dogon/README.md</a></h3>
<p>The author does not it uses <code>gets()</code> and one will get
warnings but it would be ideal if this was not the case.</p>
<h2 id="duble">2019 duble</h2>
<h3 id="status-inabiaf---please-do-not-fix-72">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019dubleprog.c">Source code: <a
href="2019/duble/prog.c">2019/duble/prog.c</a></h3>
<h3 id="information-2019dublereadme.md">Information: <a
href="2019/duble/README.md">2019/duble/README.md</a></h3>
<p>There are two things to be aware of with this entry.</p>
<p>If the file being used (to draw) is deleted it might lock any session
still in use. These will have to be killed from another shell session or
by closing the terminal tab. This will also happen if the file cannot be
opened in the beginning.</p>
<p>This program will also very likely leave sockets lying about in the
current working directory. For instance <a
href="/authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a> showed
us this:</p>
<div class="sourceCode" id="cb90"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb90-1"><a href="#cb90-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ls <span class="at">-al</span> <span class="kw">|</span><span class="fu">grep</span> <span class="st">&#39;^s&#39;</span></span>
<span id="cb90-2"><a href="#cb90-2" aria-hidden="true" tabindex="-1"></a><span class="ex">srwxr-xr-x</span> 1 cody staff 0 Apr 6 08:19 .BDHFHALG=</span>
<span id="cb90-3"><a href="#cb90-3" aria-hidden="true" tabindex="-1"></a><span class="ex">srwxr-xr-x</span> 1 cody staff 0 Apr 6 08:15 .CGGHAMGC=</span>
<span id="cb90-4"><a href="#cb90-4" aria-hidden="true" tabindex="-1"></a><span class="ex">srwxr-xr-x</span> 1 cody staff 0 Apr 6 08:16 .CMDGAELH=</span>
<span id="cb90-5"><a href="#cb90-5" aria-hidden="true" tabindex="-1"></a><span class="ex">srwxr-xr-x</span> 1 cody staff 0 Apr 3 08:47 .CMLBCCDA=</span>
<span id="cb90-6"><a href="#cb90-6" aria-hidden="true" tabindex="-1"></a><span class="ex">[...]</span></span></code></pre></div>
<p>This is NOT a bug and you’ll have to (at least at this time?) delete
the files manually. You shouldn’t have to worry about these being added
to git: it seems to ignore sockets (it did at least in macOS).</p>
<p>He provides the following tips on this situation. A simpler way to
find sockets in the directory:</p>
<div class="sourceCode" id="cb91"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb91-1"><a href="#cb91-1" aria-hidden="true" tabindex="-1"></a><span class="fu">file</span> .<span class="pp">*</span><span class="kw">|</span><span class="fu">grep</span> socket<span class="kw">|</span><span class="fu">cut</span> <span class="at">-f1</span> <span class="at">-d:</span></span></code></pre></div>
<p>To delete them you can do:</p>
<div class="sourceCode" id="cb92"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb92-1"><a href="#cb92-1" aria-hidden="true" tabindex="-1"></a><span class="fu">find</span> . <span class="at">-exec</span> file <span class="st">&#39;{}&#39;</span> <span class="dt">\;</span><span class="kw">|</span><span class="fu">grep</span> socket<span class="kw">|</span><span class="fu">cut</span> <span class="at">-f</span> 1 <span class="at">-d:</span> <span class="kw">|</span> <span class="fu">xargs</span> rm <span class="at">-f</span></span></code></pre></div>
<p>though one might want to check that the program is not currently
running. :-)</p>
<h2 id="endoh">2019 endoh</h2>
<h3 id="status-inabiaf---please-do-not-fix-73">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019endohprog.c">Source code: <a
href="2019/endoh/prog.c">2019/endoh/prog.c</a></h3>
<h3 id="information-2019endohreadme.md">Information: <a
href="2019/endoh/README.md">2019/endoh/README.md</a></h3>
<p>As a backtrace quine this entry is <strong>SUPPOSED to
segfault</strong> so this should not be touched either.</p>
<h2 id="karns">2019 karns</h2>
<h3 id="status-inabiaf---please-do-not-fix-74">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019karnsprog.c">Source code: <a
href="2019/karns/prog.c">2019/karns/prog.c</a></h3>
<h3 id="information-2019karnsreadme.md">Information: <a
href="2019/karns/README.md">2019/karns/README.md</a></h3>
<p>The author stated the following:</p>
<hr />
<ul>
<li>The program must be ran in a terminal that supports ANSI escape
codes for moving the cursor and changing colors.</li>
<li>Segfaults happen sometimes.</li>
<li>I don’t know what memory management there is, if any.</li>
<li>The program will not compile by an ANSI C compiler: it uses for
loops, and it uses C++ style comments. It should compile cleanly using a
C99 standard.</li>
<li>Breadth first search is slow (and very slow on certain maps), but my
A star version of this program is too big.</li>
<li>Lots of extra whitespace may be needed if you want to feed in an
arbitrary file.</li>
<li>It fails to compile on GCC sometimes (according to a friend of mine,
I’ve not encountered this myself).</li>
<li>The program could be obfuscated much further.</li>
<li>The program contains some unused code and data.</li>
</ul>
<h2 id="lynn">2019 lynn</h2>
<h3 id="status-inabiaf---please-do-not-fix-75">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019lynnprog.c">Source code: <a
href="2019/lynn/prog.c">2019/lynn/prog.c</a></h3>
<h3 id="information-2019lynnreadme.md">Information: <a
href="2019/lynn/README.md">2019/lynn/README.md</a></h3>
<p>The author wrote that there are a number of differences from what one
might expect. Rather than duplicate the information we refer you to the
author’s remarks in the sections <a
href="/2019/lynn/README.md#syntax">Syntax</a> and <a
href="/2019/lynn/README.md#caveats">Caveats</a>.</p>
<h2 id="mills-2">2019 mills</h2>
<h3 id="status-inabiaf---please-do-not-fix-76">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019millsprog.c">Source code: <a
href="2019/mills/prog.c">2019/mills/prog.c</a></h3>
<h3 id="information-2019millsreadme.md">Information: <a
href="2019/mills/README.md">2019/mills/README.md</a></h3>
<p>The author wrote that if you decide to change networks or use a
different input file you should delete all the checkpoint files because
the format depends on both the network and the input – using the wrong
checkpoint is likely to cause a crash.</p>
<p>The author also wrote:</p>
<hr />
<p><strong>IMPORTANT NOTE</strong>: Since OMLET uses the system stack
for network storage, larger networks may cause OMLET to crash (typically
with a message like <code>Segmentation fault</code>) unless the system
stack size is first increased. The exact command for doing so depends on
your shell and your system’s hard limits. On
<code>sh</code>/<code>ksh</code>/<code>bash</code> shells, you can view
the hard limit with <code>ulimit -Hs</code> and set it with
<code>ulimit -s 65532</code> (replacing <code>65532</code> with the
actual hard limit). On <code>csh</code>/<code>tcsh</code> shells, you
can view the hard limit with <code>limit -h stacksize</code> and set it
with <code>limit stacksize 65532</code> (replacing <code>65532</code>
with the actual hard limit).</p>
<hr />
<h2 id="poikola">2019 poikola</h2>
<h3 id="status-inabiaf---please-do-not-fix-77">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019poikolaprog.c">Source code: <a
href="2019/poikola/prog.c">2019/poikola/prog.c</a></h3>
<h3 id="information-2019poikolareadme.md">Information: <a
href="2019/poikola/README.md">2019/poikola/README.md</a></h3>
<p>This program will not validate input so it might fail or get stuck if
invoked erroneously.</p>
<p>Also, the maximum file size is 1GB.</p>
<h2 id="yang">2019 yang</h2>
<h3 id="status-inabiaf---please-do-not-fix-78">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2019yangprog.c">Source code: <a
href="2019/yang/prog.c">2019/yang/prog.c</a></h3>
<h3 id="information-2019yangreadme.md">Information: <a
href="2019/yang/README.md">2019/yang/README.md</a></h3>
<p>The author noted that if the program runs out of memory it is likely
to crash.</p>
<p>The author also stated that ‘if input contains CR-LF end of line
sequences, those <code>CR</code>s are silently dropped. In fact, most
control codes are silently ignored except line feeds (preserved) and
tabs (expanded to 8 spaces).’</p>
<h1 id="section-36">2020</h1>
<h2 id="burton-1">2020 burton</h2>
<h3 id="status-inabiaf---please-do-not-fix-79">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2020burtonprog.c">Source code: <a
href="2020/burton/prog.c">2020/burton/prog.c</a></h3>
<h3 id="information-2020burtonreadme.md">Information: <a
href="2020/burton/README.md">2020/burton/README.md</a></h3>
<p>This entry is known to crash if no arg is specified. Although easy to
fix it is documented and should not be fixed (of course you may fix it
to see if you can but it shouldn’t be made into a pull request).</p>
<p>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?</p>
<h2 id="carlini">2020 carlini</h2>
<h3 id="status-inabiaf---please-do-not-fix-80">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2020carliniprog.c">Source code: <a
href="2020/carlini/prog.c">2020/carlini/prog.c</a></h3>
<h3 id="information-2020carlinireadme.md">Information: <a
href="2020/carlini/README.md">2020/carlini/README.md</a></h3>
<p>The author stated that bad things happen if the entered move is
outside of the range [1..9]. We observed a crash but we also observed a
tie and other things besides (say with the input <code>-1</code>,
<code>-</code>, <code>-10</code> and others).</p>
<p>If a player makes a move over their opponent’s place they will
automatically lose.</p>
<p>If a player tries to play a move they already played they will
forfeit their move.</p>
<p>If you have audible bells enabled the program will beep at every
turn.</p>
<h2 id="ferguson1">2020 ferguson1</h2>
<h3 id="status-inabiaf---please-do-not-fix-81">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2020ferguson1prog.c">Source code: <a
href="2020/ferguson1/prog.c">2020/ferguson1/prog.c</a></h3>
<h3 id="information-2020ferguson1readme.md">Information: <a
href="2020/ferguson1/README.md">2020/ferguson1/README.md</a></h3>
<p>There are some things that might appear to be bugs but are actually
features or things that are misinterpreted as bugs. See the <a
href="2020/ferguson1/bugs.md">bugs.md</a> and <a
href="2020/ferguson1/troubleshooting.md">troubleshooting.md</a> files
for details.</p>
<h2 id="giles">2020 giles</h2>
<h3 id="status-inabiaf---please-do-not-fix-82">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2020gilesprog.c">Source code: <a
href="2020/giles/prog.c">2020/giles/prog.c</a></h3>
<h3 id="information-2020gilesreadme.md">Information: <a
href="2020/giles/README.md">2020/giles/README.md</a></h3>
<p>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.</p>
<h2 id="otterness">2020 otterness</h2>
<h3 id="status-inabiaf---please-do-not-fix-83">STATUS: INABIAF - please
<strong>DO NOT</strong> fix</h3>
<h3 id="source-code-2020otternessprog.c">Source code: <a
href="2020/otterness/prog.c">2020/otterness/prog.c</a></h3>
<h3 id="information-2020otternessreadme.md">Information: <a
href="2020/otterness/README.md">2020/otterness/README.md</a></h3>
<p>The author listed the following limitations:</p>
<ol type="1">
<li><p>The program does not support MIDI files over 4 MB (specifically,
it will not take input files larger than <code>2^22 - 1</code> bytes).
This is unlikely to be a big limitation in practice, since even lengthy
MIDIs are rarely over a couple hundred KB.</p></li>
<li><p>Not all MIDIs set (or <em>correctly</em> set) their timing
information, which will lead to the tempo of the drum beat not matching
the track. This will be especially true for “live performance” .mid
files.</p></li>
<li><p>There may be some types of MIDI messages that the program is
unable to correctly parse, but I have rarely seen this in practice. The
largest cause of program failures, in my experience, has been Limitation
2.</p></li>
</ol>
<p>See also the <a
href="/2020/otterness/README.md#program-error-codes">Program error
codes</a> written by the author which lists some other conditions which
should be considered features, not bugs.</p>
<h1 id="section-37">2021</h1>
<p>There was no IOCCC in 2021.</p>
<h1 id="section-38">2022</h1>
<p>There was no IOCCC in 2022.</p>
<h1 id="section-39">2023</h1>
<p>There was no IOCCC in 2023.</p>
<h1 id="section-40">2024</h1>
<p>We hope to run the IOCCCMOCK this year, 2024, and hopefully the next
IOCCC, but for now we wish everyone a happy new year!</p>
<h1 id="final-words">Final words</h1>
<p>We hope this document was of use to you in determining which entries
are known to have a problem, what entries are known to have features
that are not bugs and so on. We also thank you for going through this
document and, if you propose any fixes] via a <a
href="https://github.com/ioccc-src/temp-test-ioccc/pulls">GitHub pull
request</a> or otherwise, we thank you as well for the help! We will
happily add you to the <a href="/thanks-for-help.md">thanks</a> file as
well.</p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/end-row.default.html -->
</div>
<!-- END: this line ends content from: inc/end-row.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<div class="footer">
<hr>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2Flocation.html">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->