omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / qualification / security673 / exec-child.om
| 1 | note A real executed consumer. Extra descriptors must be absent, assigned stdin/stdout must work. |
| 2 | global data uchar 16 |
| 3 | text input "public-input" |
| 4 | text output "public-output" |
| 5 | fn main to int |
| 6 | if ne read 3 data 0 1 neg long 9 |
| 7 | ret 42 |
| 8 | end |
| 9 | if ne read 65537 data 0 1 neg long 9 |
| 10 | ret 43 |
| 11 | end |
| 12 | if ne read 0 data 0 len input long len input |
| 13 | ret 44 |
| 14 | end |
| 15 | for i ulong len input |
| 16 | if ne get data i get input i |
| 17 | ret 45 |
| 18 | end |
| 19 | end |
| 20 | if ne write 1 output 0 len output long len output |
| 21 | ret 46 |
| 22 | end |
| 23 | ret 0 |
| 24 | end |