Reapply no arg check in 1990/theorem
Due to a misunderstanding between Landon and me after some discussion on GitHub it was recommended that I reapply this fix so I have done so. I've updated the bugs.md file to change the definition of INABIAF (it's not a bug it's a feature) as well as adding another known bug with this entry to the file (this has also been added to README.md). In bugs.md I also added towards the top a note to the winning authors about fixes applied to their entries. Particularly if an author objects to the fix we'll be happy to undo it even if it impacts the usability of the program. There there is an apology too. We know there's a fine line and although we have tried to use good judgement invariably some will be the wrong decision. Thank you for understanding and apologies!
This commit is contained in:
1 parent
5ee254e24c
commit
9b3bdcae58
4 files changed
+90
-28
No files matched your search
+13
-9
@@ -18,14 +18,14 @@ impacted the usability of this program including some segfaults under modern
|
||||
systems (and possibly in some cases earlier systems) with this entry.
|
||||
Originally we noted that the 4 trailing args '0 0 0 0' were required on systems
|
||||
that dump core when NULL is dereferenced but this problem showed itself in
|
||||
modern systems even with the 4 '0 0 0 0'. He also fixed the code so that the
|
||||
generated `fibonacci.c` actually works; before it just printed `0` over and over
|
||||
again (since it did not work anyway a segfault prevention was added here). He
|
||||
also some array addressing (some of which might not be strictly necessary but as
|
||||
he was testing the `fibonacci.c` bug he ended up changing it anyway). Finally he
|
||||
changed this program to use `fgets()` not `gets()` to make it safer and to
|
||||
prevent a warning about `gets()` at linking or runtime. Thank you Cody for your
|
||||
assistance!
|
||||
modern systems even with the 4 '0 0 0 0'. He also fixed a segfault if not enough
|
||||
args are specified and fixed the code so that the generated `fibonacci.c`
|
||||
actually works; before it just printed `0` over and over again (since it did not
|
||||
work anyway a segfault prevention was added here). He also some array addressing
|
||||
(some of which might not be strictly necessary but as he was testing the
|
||||
`fibonacci.c` bug he ended up changing it anyway). Finally he changed this
|
||||
program to use `fgets()` not `gets()` to make it safer and to prevent a warning
|
||||
about `gets()` at linking or runtime. Thank you Cody for your assistance!
|
||||
|
||||
[Yusuke Endoh](/winners.html#Yusuke_Endoh) pointed out that `atof` nowadays
|
||||
needs `#include <stdlib.h>` which was used in order to get this to work
|
||||
@@ -46,7 +46,6 @@ where:
|
||||
h - step size
|
||||
y1 - initial value (y(x1) == y1)
|
||||
|
||||
NOTE: this entry will segfault on no arg specified.
|
||||
|
||||
## Try:
|
||||
|
||||
@@ -54,6 +53,11 @@ NOTE: this entry will segfault on no arg specified.
|
||||
./theorem y 0 1 0.1 1
|
||||
```
|
||||
|
||||
### Known bug with `fibonacci.c` and `theorem_bkp.c`:
|
||||
|
||||
If the two args added up equals 0 the program will enter an infinite loop,
|
||||
printing 0 over and over again. Cody fixed another condition where this happens
|
||||
but this has not been fixed. See [bugs.md](/bugs.md) for more details.
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
|
||||
Reference in new issue
Block a user