Fix 1988/dale to no longer need -traditional-cpp
There were a couple problems to resolve. First
#define a(x)get/***/x/***/id())
p Z=chroot("/");L(!a(u)execv((q(v="/ipu6ljov"),v),C);Z-=kill(l);
...
case_2:L(!--V){O/*/*/c*c+c);wait(A+c*c-c);L(!Z)f(A,"\n",c);return(A*getgid());};C++;
does not work to create getuid() and getgid(). The second is that
for/*/(;;);/*/k()){O/*/*/c);
cannot form 'fork())' in modern C compilers. What is quite fun is that
the cpp can!
Removed this entry from bugs.md.
This commit is contained in:
1 parent
06a5665f5d
commit
5e2d3e6bf1
4 files changed
+48
-25
No files matched your search
+44
-13
@@ -1,28 +1,57 @@
|
||||
## Best abuse of system calls
|
||||
|
||||
Paul Dale
|
||||
University of Queensland
|
||||
Computer Science Dept
|
||||
Dept of Computer Science
|
||||
Uni of Qld, 4067
|
||||
Australia
|
||||
Paul Dale
|
||||
University of Queensland
|
||||
Computer Science Dept
|
||||
Dept of Computer Science
|
||||
Uni of Qld, 4067
|
||||
Australia
|
||||
|
||||
## To build:
|
||||
|
||||
make all
|
||||
```sh
|
||||
make all
|
||||
```
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
|
||||
systems. Modern compilers do not allow directives like:
|
||||
compilers. There were two problems to address. One was that the entry required
|
||||
`-traditional-cpp` which it no longer does. It needed this because of two things
|
||||
it did:
|
||||
|
||||
#define _ define
|
||||
-#_ foo bar
|
||||
```c
|
||||
#define a(x)get/***/x/***/id())
|
||||
|
||||
p Z=chroot("/");L(!a(u)execv((q(v="/ipu6ljov"),v),C);Z-=kill(l);
|
||||
|
||||
...
|
||||
|
||||
case_2:L(!--V){O/*/*/c*c+c);wait(A+c*c-c);L(!Z)f(A,"\n",c);return(A*getgid());};C++;
|
||||
```
|
||||
|
||||
does not work to create `getuid()` and `getgid()`. The second is that
|
||||
|
||||
for/*/(;;);/*/k()){O/*/*/c);
|
||||
|
||||
cannot form 'fork())' in modern C compilers. What is quite fun is that the cpp
|
||||
can!
|
||||
|
||||
The other problem was that modern compilers do not allow directives like:
|
||||
|
||||
```c
|
||||
#define _ define
|
||||
+#_ P char
|
||||
+#_ p int
|
||||
+#_ O close(
|
||||
...
|
||||
```
|
||||
|
||||
so Cody changed the lines to be in the form of:
|
||||
|
||||
#define foo bar
|
||||
```c
|
||||
#define foo bar
|
||||
```
|
||||
|
||||
Even so this entry requires a compiler that supports the `-traditional-cpp`
|
||||
option. Thank you Cody for your assistance!
|
||||
Thank you Cody for your assistance!
|
||||
|
||||
|
||||
## Try:
|
||||
@@ -31,6 +60,8 @@ option. Thank you Cody for your assistance!
|
||||
./dale hello world
|
||||
./dale these files are in this directory: *
|
||||
|
||||
NOTE: in linux it might happen that core dumps are created when running this
|
||||
entry even though it works fine.
|
||||
|
||||
## Judges' comments
|
||||
|
||||
|
||||
Reference in new issue
Block a user