From 236e44f00fed5cbcd02b4936b765f3bb97ad0e98 Mon Sep 17 00:00:00 2001 From: Neil Johari Date: Tue, 16 Sep 2025 00:03:08 -0700 Subject: [PATCH] Remove debug logging --- programs/dibio.c | 16 --------------- test_allocation_bug.sh | 44 ------------------------------------------ 2 files changed, 60 deletions(-) delete mode 100755 test_allocation_bug.sh diff --git a/programs/dibio.c b/programs/dibio.c index 29a27d9db..dc629103b 100644 --- a/programs/dibio.c +++ b/programs/dibio.c @@ -279,8 +279,6 @@ static fileStats DiB_fileStats(const char** fileNamesTable, int nbFiles, size_t for (n=0; n alloc_test/good_$i.txt -done - -echo "Valid files created (about 6 bytes each = 30 bytes total)" -echo "" - -# We need enough bad files to make totalSizeToLoad negative -# 30 bytes positive, so we need at least 31 bad files -echo "Adding 1000 non-existent files to make totalSizeToLoad very negative..." -echo "Expected: totalSizeToLoad = 30 + (1000 * -1) = -970 bytes" -echo "" - -# Build command -CMD="./zstd --train alloc_test/good_*.txt" -for i in {1..1000}; do - CMD="$CMD alloc_test/BAD_$i" -done -CMD="$CMD -o alloc_test/dict.zst --maxdict=65536 2>&1" - -echo "Running command..." -echo "=================" - -# Run and capture ALL debug output related to our issue -eval $CMD | grep -E "\[DEBUG FINAL\]|\[DEBUG\] Memory calc|\[BUG\]|About to malloc|Error|not enough memory" - -echo "" -echo "Output should show something like the following:" -echo "1. [DEBUG FINAL] fileStats: totalSizeToLoad=-970 (NEGATIVE!)" -echo "2. [BUG] totalSizeToLoad is NEGATIVE!" -echo "3. [DEBUG] Memory calc: showing huge loadedSize value" -echo "4. Error about memory allocation" -- 2.47.3