mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-07-24 15:47:11 +00:00
Replaces the binary compressed-rom check with store_raw_worth_it(), which decides per environment: store the naked binary on $BINDIR (0 RAM) only when $TMPDIR is tmpfs AND $BINDIR can hold it with margin (estimated ~2:1 on squashfs/ubifs, full size otherwise). Otherwise keep a compressed copy and decompress to tmp as before. core_webget skips the upx core when raw storage is viable, fetching tar.gz instead. Rationale (rough budgets for a ~40M core): raw on squashfs ~15M rom / 0 RAM; gz 10M rom / ~40M RAM; upx 9M rom / ~40M RAM (memfd). Raw wins when rom has room; compressed wins when rom is the scarce resource. Also corrects the upx branch symlink target $TMPDIR -> $BINDIR (#1295). For #1304