Commit graph

9 commits

Author SHA1 Message Date
Stéphane Travostino
cdfae7d453 apps/maze: fix possible stack overflow
The original code this app is inspired from uses rand(), which returns
a number >= 0.
mulberry32() on the other hand can return a negative number, in which
case will overflow the accesses in the dirs array. Fix that by forcing
the result to be unsigned.
2025-12-14 10:15:04 +01:00
Toby Jaffey
5bd6a32013 Move all app common files under apps/common 2025-12-12 15:45:17 +00:00
Toby Jaffey
42cd77a9ff Cleanup paths 2025-12-11 20:35:39 +00:00
Toby Jaffey
8802b4c268 Maze works at -O2 with -fpeel-loops 2025-12-11 01:33:04 +00:00
Toby Jaffey
58f8caee5a Prevent gcc converting block copies/sets to memcpy() and memset(), which don't exist. 2025-12-11 01:10:55 +00:00
Toby Jaffey
e0eb6615c0 maze crashes at high optimisation level, when "maze" variable gets memset 2025-12-10 23:59:11 +00:00
Toby Jaffey
da7f70c456 Initial test framework
Clean up makefiles
Everything buildable under docker (or natively)
2025-12-10 16:36:33 +00:00
Toby Jaffey
9baedb42e8 Add a stack canary, setup on boot 2025-12-10 01:00:36 +00:00
Toby Jaffey
9596838a4b Recursive maze demo, causes big stack usage 2025-12-09 23:29:16 +00:00