build missing HTML files for entries
Setup a simple topnav for missing HTML files for entries. Added `bin/gen-other-html.sh` to build entry HTML files from markdown other than README.md to index.html HTML files. Fixed duplicate link text in `2020/ferguson1/gameplay.md`. Improved `inc/md2html.cfg` to support building the missing HTML files for entries. Added `make gen_other_html` to top level Makefile. Added `make gen_other_html` to `make quick_www` and `make www`. Fixed inventory links for year level index.html files. Changed `bin/output-year-index.sh` VERSION from "1.0.1 2024-02-23" to "1.1 2024-02-27". Added missing lines in `manifest.numbers`. Update the affected `.entry.json` files. The manifest (in both `manifest.numbers` and the collection of manifests from of all entry `.entry.json` files) now match. Errors from `make verify_entry_files` will now abort both `make quick_www` and `make www` rules in the top level `Makefile`. Changed markdown files in manifest to have an _inventory_order_ of _2000000000_ so that the `index.html` file will usually appear at the start of the _Secondary files_ set for the "#inventory" section of an entry's `index.html` file. Changed compressed tar files (files that end in _.tar.bz2_) in manifest to have an _inventory_order_ of _100000_ so that these files will usually appear at the end of the _Primary files_ set for the "#inventory" section of an entry's `index.html` file. Added 'Jump to top` link above the _Primary files_ section. Changed `bin/output-index-inventory.sh` VERSION from "1.1.1 2024-02-23" to "1.2 2024-02-27". Updated HTML files to perform the above via `make www`.
This commit is contained in:
1 parent
7babf792e4
commit
9d3438fb88
718 files changed
+17515
-4084
No files matched your search
@@ -0,0 +1,215 @@
|
||||
<!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-other-html.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="compilers.md for 1986/marshall">
|
||||
<meta name="keywords" content="IOCCC, 1986/marshall, compilers.md">
|
||||
</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>compilers.md for 1986/marshall</h2>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.up2index.html -->
|
||||
|
||||
<div class="topnav">
|
||||
<a class="Left" href="index.html">↑ jump to index.html ↑</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.up2index.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 & (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="conflicting-compilers-and-optimisers-that-broke-this-entry-in-2023">Conflicting
|
||||
compilers and optimisers that broke this entry in 2023</h1>
|
||||
<p>As briefly noted in the <a href="README.md">README.md</a> gcc and
|
||||
clang caused different problems with this entry depending on the
|
||||
optimiser being enabled or not, where if the optimiser was enabled it
|
||||
would work with one compiler and not the other. But if you then disabled
|
||||
the optimiser the opposite problem would occur: the working compiler
|
||||
would no longer work and the non-functional one would start to work! And
|
||||
then there’s the problem of linux versus macOS causing problems.</p>
|
||||
<p>The <a href="marshall.alt.c">alternate code</a> (source code)
|
||||
demonstrates the problem so you can see if your compiler has the problem
|
||||
as described below.</p>
|
||||
<p>In some versions of gcc and clang (this was first discovered in
|
||||
fedora linux 38) if the compiler was enabled one compiler would generate
|
||||
code that segfaulted but the other one would not. However, when then
|
||||
disabling the optimiser the compiler that had no problem suddenly did
|
||||
and the one that did suddenly did not. But segfaulting was not by any
|
||||
means the only problem.</p>
|
||||
<p>Another problem was that depending on the optimiser an infinite loop
|
||||
would be entered. But then removing it would cause other problems as
|
||||
well, including a segfault.</p>
|
||||
<p>It was not only one compiler that dumped core. Both dumped core with
|
||||
other behaviour, depending on what changes in code were made and the
|
||||
optimiser being on or off. Clang in macOS also dumped core!</p>
|
||||
<p>The <a href="README.md#alternate-code">alternate code</a> (README.md)
|
||||
has the original fix for clang which works with some compilers depending
|
||||
on the optimiser. When we refer to the code below we refer to the
|
||||
alternate code.</p>
|
||||
<h2 id="the-conflicting-compiler-problems">The conflicting compiler
|
||||
problems:</h2>
|
||||
<p>Below we describe the conflicting options that resulted in the need
|
||||
to modify the original code.</p>
|
||||
<h3 id="linux">Linux</h3>
|
||||
<p>With the optimiser disabled GCC compiled the code to enter an
|
||||
infinite loop. Enabling the optimiser and it worked fine. But if the
|
||||
optimiser is enabled clang generates code that first prints the text
|
||||
twice (it should print it once) and then immediately dumps core!</p>
|
||||
<p>But then there’s that infinite loop. What happens if we remove
|
||||
it?</p>
|
||||
<p>Once the loop is removed if we compile with clang and the optimiser
|
||||
is disabled all is okay. If however we compile with gcc and the
|
||||
optimiser is disabled the string is printed once and then the program
|
||||
dumps core! Why is this? It is because of the call to
|
||||
<code>_exit()</code> (see below).</p>
|
||||
<p>Clang works fine with the loop removed and the optimiser disabled. If
|
||||
however we enable the optimiser clang will generate code that prints the
|
||||
string twice and dumps core just like before! What about the call to
|
||||
<code>_exit()</code>?</p>
|
||||
<p>The call was:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>_exit<span class="op">(</span>argv<span class="op">[(</span><span class="dt">int</span><span class="op">)*</span>argc<span class="op">-</span><span class="dv">2</span><span class="op">/</span>cc<span class="op">[</span><span class="dv">1</span><span class="op">*(</span><span class="dt">int</span><span class="op">)*</span>argc<span class="op">]|-</span><span class="dv">1</span><span class="op"><<</span><span class="dv">4</span><span class="op">]);</span></span></code></pre></div>
|
||||
<p>Changing it to not refer to these variables and just exit 1 and the
|
||||
problems disappear!</p>
|
||||
<h3 id="macos">macOS</h3>
|
||||
<p>But then there was macOS which had another problem!</p>
|
||||
<p>If the infinite loop is not removed/commented out and the optimiser
|
||||
is enabled it works fine but if it’s disabled it prints out the string
|
||||
and then enters an infinite loop!</p>
|
||||
<p>After we fix the infinite loop if we change the <code>_exit()</code>
|
||||
call in macOS and disable the optimiser we might get something like:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./marshall</span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">choo</span> choo</span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Segmentation</span> fault: 11</span></code></pre></div>
|
||||
<p>Observe how it doesn’t print it twice. But of course it segfaults so
|
||||
it’s not right either.</p>
|
||||
<p>If the optimiser is enabled, however, we will see that it works fine
|
||||
before the change to <code>_exit()</code>.</p>
|
||||
<h2 id="summary">Summary</h2>
|
||||
<p>And that is the tale of a little <strike>engine</strike> train that
|
||||
could…eventually! Or perhaps it’s the compilers, optimisers and OSes
|
||||
that eventually could?</p>
|
||||
<p>Whichever you wish it to be, it now works with both clang and gcc!
|
||||
Choo choo!</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=#">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 -->
|
||||
Reference in new issue
Block a user