Try fixing 2011/richards + update README.md
This does not work with macOS but I'm not sure if this has to do with
macOS or the fact it's the Apple silicon chip. The fact it works in
linux makes it harder to figure out what the problem is. Still I tried
to change the protection of the mmap() call. Different values can
actually make it crash in linux as well but this does work. Of course
the fact it works with linux doesn't mean much since it already did work
with linux. This is a work in progress. Doing
make CC=clang CSILENCE= CWARN="-Wall -Wextra -Weverything" clobber all
can give a lot of interesting warnings that might or might not be
relevant including one about alignment. In bugs.md I cited where it
appears to crash.
Format fixed the README.md.
This commit is contained in:
1 parent
7af99c8c9e
commit
d0ac8c8213
4 files changed
+44
-14
No files matched your search
@@ -1829,6 +1829,33 @@ 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.
|
||||
|
||||
## [2011/richards](2011/richards/richards.c) ([README.md](2011/richards/README.md))
|
||||
## STATUS: doesn't work with some platforms - please help us fix
|
||||
|
||||
This does not appear to work with macOS. We're not sure if this is to do with
|
||||
the Apple silicon chip or not. At a glance it appears to be that it might be the
|
||||
function pointers. In particular it seems to crash at:
|
||||
|
||||
```c
|
||||
|
||||
W(1) while ((c = *p)) {
|
||||
```
|
||||
|
||||
in the `K` function. It's called like this, from main():
|
||||
|
||||
```c
|
||||
while (b = fgets(malloc(999), 999, stdin))
|
||||
((f) K(b, d)) (d);
|
||||
```
|
||||
|
||||
But what is curious is that it seems to have different problems depending on the
|
||||
macros defined. In an attempt to get it to work the `mmap()` call was changed to
|
||||
allow for exec and read and write (which might be a problem in such a
|
||||
combination) but this only works in linux (it already did work in linux,
|
||||
however, so this doesn't help much).
|
||||
|
||||
Do you have a fix? We welcome it!
|
||||
|
||||
# 2012
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user