force use of pandoc version >= 3.1.12.2
The `bin/pandoc-wrapper.sh` tool will verify that the ssytem has a recent enough version of `pandoc(1)`. We explain why we insist on `pandoc(1)`. version >= 3.1.12.2 in comments where the $PANDOC_MIN_VERSION is set. Added `--wrap=preserve` as a default argument to `pandoc(1)`. While this change will impact every HTML file generated, we believe this will improve the ability of someone to look at the generated HTML and correlate with the original markdown. Changed `bin/pandoc-wrapper.sh` VERSION from "1.4.2 2024-03-17" to "1.4.3 2024-03-18". Performed `make www` to achieve all of the above and to generate HTML using the new `--wrap=preserve` `pandoc(1)` mode.
This commit is contained in:
1 parent
9eb7a54e9f
commit
b0b212acb1
402 files changed
+37061
-55132
No files matched your search
@@ -120,79 +120,68 @@
|
||||
<!-- 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>
|
||||
<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>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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
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 -->
|
||||
|
||||
+36
-62
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Eric_Marshall">Eric
|
||||
Marshall</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<em>United States of America</em> (<em>United States</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Eric_Marshall">Eric Marshall</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -141,93 +141,67 @@ Marshall</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>NOTE: we FORCE disable the optimiser due to a funny problem with
|
||||
different compilers and systems. See below and <a
|
||||
href="compilers.html">compilers.html</a> for details.</p>
|
||||
<p>There is an <a href="#alternate-code">alternate version</a>. The
|
||||
reason is a funny problem: in modern systems, depending on the platform,
|
||||
compiler and the optimiser, it would work with one compiler with the
|
||||
optimiser but it would not work with the other; and if the optimiser
|
||||
state is changed the previous problematic compiler might work but the
|
||||
other one would not. We describe this in more detail in <a
|
||||
href="compilers.html">compilers.html</a> and we encourage you to read it
|
||||
for entertainment if nothing else.</p>
|
||||
<p>NOTE: we FORCE disable the optimiser due to a funny problem with different
|
||||
compilers and systems. See below and <a href="compilers.html">compilers.html</a> for details.</p>
|
||||
<p>There is an <a href="#alternate-code">alternate version</a>. The reason is a funny problem:
|
||||
in modern systems, depending on the platform, compiler and the optimiser, it
|
||||
would work with one compiler with the optimiser but it would not work with the
|
||||
other; and if the optimiser state is changed the previous problematic compiler
|
||||
might work but the other one would not. We describe this in more detail in
|
||||
<a href="compilers.html">compilers.html</a> and we encourage you to read it for entertainment
|
||||
if nothing else.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<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">./marshall</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>Due to the different <a href="compilers.html">conflicting
|
||||
problems</a> with gcc and clang, we instead offer the problematic code
|
||||
as an alternate version whereas <a href="marshall.c">marshall.c</a> has
|
||||
both the infinite loop and the complicated arg to <code>_exit()</code>
|
||||
commented out, changing the value passed into <code>_exit()</code> to
|
||||
<code>1</code>.</p>
|
||||
<p>Due to the different <a href="compilers.html">conflicting problems</a> with gcc and clang, we
|
||||
instead offer the problematic code as an alternate version whereas
|
||||
<a href="marshall.c">marshall.c</a> has both the infinite loop and the complicated arg to
|
||||
<code>_exit()</code> commented out, changing the value passed into <code>_exit()</code> to <code>1</code>.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To see if your compiler has the problems noted:</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="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<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">./marshall.alt</span></span></code></pre></div>
|
||||
<p>Does it work in your system? That is does it not segfault, does it
|
||||
print it only once and does it not enter an infinite loop? Or more
|
||||
generally does it print the text exactly once and then exit?</p>
|
||||
<p>Does it work in your system? That is does it not segfault, does it print it only
|
||||
once and does it not enter an infinite loop? Or more generally does it print the
|
||||
text exactly once and then exit?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program prints the name of the picture. The layout is somewhat
|
||||
pretty though it is not the usual sort of output one would expect from
|
||||
printing a program!</p>
|
||||
pretty though it is not the usual sort of output one would expect
|
||||
from printing a program!</p>
|
||||
<p>This program was selected for the 1987 t-shirt collection.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>No remarks were provided by the author.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0 License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
||||
You are free to share and adapt this file under the terms of this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<p>For more information, see: https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
|
||||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
|
||||
|
||||
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1986marshall"><a name="inventory"></a>Inventory
|
||||
for 1986/marshall</h1>
|
||||
<h1 id="inventory-for-1986marshall"><a name="inventory"></a>Inventory for 1986/marshall</h1>
|
||||
<p><a href="#top">Jump to top</a></p>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.c">marshall.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.alt.c">marshall.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.orig.c">marshall.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="compilers.html">compilers.html</a> - about compilers and
|
||||
optimizers that broke this entry</li>
|
||||
<li><a href="1986_marshall.tar.bz2">1986_marshall.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.c">marshall.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.alt.c">marshall.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.orig.c">marshall.orig.c</a> - original source</li>
|
||||
<li><a href="compilers.html">compilers.html</a> - about compilers and optimizers that broke this entry</li>
|
||||
<li><a href="1986_marshall.tar.bz2">1986_marshall.tar.bz2</a> - download entry source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - entry home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/compilers.md">compilers.md</a>
|
||||
- markdown source for compilers.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/README.md">README.md</a> - markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/compilers.md">compilers.md</a> - markdown source for compilers.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
Reference in new issue
Block a user