raz / test / run / NilBig.raz

18 lines · 364 B · raw · history · last change 3a4fb62b

1module NilBig;
2(* A field of a nil pointer past the page at address 0 that is never
3 mapped, which the machine wouldn't catch: the code tests for nil *)
4import Out;
5
6type Big = record pad: [100000]U8; last: I64; end;
7
8var p: ^Big;
9
10proc main*;
11begin
12 Out.str("before"); Out.ln;
13 Out.flush;
14 p^.last := 1;
15 Out.str("after"); Out.ln;
16end;
17
18end NilBig.