guard
Stack guards, bounds checking, overflow protection.
Load with: use guard
Quick example
use guard
result = stkne("value")
prn(result)
Functions
Stack guard
stkne(sz)
Creates a new instance. Takes sz.
stkch(g)
Checks a condition. Takes g.
stkal(g, sz)
Performs the operation. Takes g, sz.
stkfr(g, sz)
Creates from another format. Takes g, sz.
stkre(g)
Performs the operation. Takes g.
stkst(g)
Sets a value or starts a process. Takes g.
Bounds checking
bndne(p, sz)
Creates a new instance. Takes p, sz.
bndch(b, off, sz)
Checks a condition. Takes b, off, sz.
bndge(b, i, ts)
Gets or retrieves a value. Takes b, i, ts.
bndse(b, i, ts, v)
Sets a value. Takes b, i, ts, v.
bndst(b)
Sets a value or starts a process. Takes b.
Fat pointers with bounds
fatne(p, sz)
Creates a new instance. Takes p, sz.
Integer overflow checking
intad(a, b)
Adds an item. Takes a, b.
intsu(a, b)
Performs the operation. Takes a, b.
intmu(a, b)
Performs the operation. Takes a, b.
intdi(a, b)
Disconnects. Takes a, b.
Buffer overflow protection
bufmk(sz, opts)
Creates a new instance. Takes sz, opts.
Format string protection
fmtsa(fmt, args)
Performs the operation. Takes fmt, args.
Heap corruption detection
heapc()
Performs the operation.
heapa(chk, sz, loc)
Parses. Takes chk, sz, loc.
heapf(chk, p, loc)
Performs the operation. Takes chk, p, loc.
heapr(chk, p, sz, loc)
Processes or prints. Takes chk, p, sz, loc.
heapw(chk, p, d, loc)
Performs the operation. Takes chk, p, d, loc.
ASAN-like shadow memory
asanm()
Performs the operation.
asanp(a, p, sz)
Performs the operation. Takes a, p, sz.
asanu(a, p, sz)
Performs the operation. Takes a, p, sz.
asanc(a, p, sz, w)
Performs the operation. Takes a, p, sz, w.
Safe recursion limit
gurec(max)
Performs the operation. Takes max.
recen(g, loc)
Encodes. Takes g, loc.
recex(g)
Executes. Takes g.
Notes
- Input validation and sanitisation guards - type, range, regex checks.