]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
some additional comments, remove apt-get from clang jobs, better test titles 3258/head
authorDanielle Rozenblit <drozenblit@fb.com>
Fri, 9 Sep 2022 01:30:07 +0000 (18:30 -0700)
committerDanielle Rozenblit <drozenblit@fb.com>
Fri, 9 Sep 2022 01:30:07 +0000 (18:30 -0700)
.github/workflows/dev-long-tests.yml
lib/decompress/zstd_decompress.c
tests/zstreamtest.c

index c8ba69758d1e69e2e80b6f6d786f99d51de90707..f1689478f3ad07a607928f497829508f2d444223 100644 (file)
@@ -81,9 +81,7 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: clang + ASan + UBSan + Test Zstd
-      run: |
-        sudo apt-get -qqq update
-        CC=clang make -j uasan-test-zstd </dev/null V=1
+      run: CC=clang make -j uasan-test-zstd </dev/null V=1
 
   gcc-asan-ubsan-testzstd-32bit:
     runs-on: ubuntu-latest
@@ -114,9 +112,7 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: clang + ASan + UBSan + Fuzz Test
-      run: |
-        sudo apt-get -qqq update
-        CC=clang FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest
+      run: CC=clang FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest
 
   gcc-asan-ubsan-fuzz32:
     runs-on: ubuntu-latest
index 3edb9e680fb33ff1b06bf2309ab62b196a44960e..a257f5f651f8343823f41db87245b5652020f8ee 100644 (file)
@@ -2059,7 +2059,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
                     if (ZSTD_isError(decompressedSize)) return decompressedSize;
                     DEBUGLOG(4, "shortcut to single-pass ZSTD_decompress_usingDDict()")
                     ip = istart + cSize;
-                    op = op ? op + decompressedSize : op;
+                    op = op ? op + decompressedSize : op; /* can occur if frameContentSize = 0 (empty frame) */
                     zds->expected = 0;
                     zds->streamStage = zdss_init;
                     someMoreWork = 0;
@@ -2194,7 +2194,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
                         zds->outStart = zds->outEnd = 0;
                     }
                     break;
-            }}
+            }   }
             /* cannot complete flush */
             someMoreWork = 0;
             break;
index 04a75f09e1c4c966771f6765b957566503b26b1c..94eb848aa1b1bce83bec93e4f9103e551ebb2651 100644 (file)
@@ -522,7 +522,7 @@ static int basicUnitTests(U32 seed, double compressibility)
     }
     DISPLAYLEVEL(3, "OK \n");
 
-    DISPLAYLEVEL(3, "test%3i : NULL buffers : ", testNb++);
+    DISPLAYLEVEL(3, "test%3i : NULL output and NULL input : ", testNb++);
     inBuff.src = NULL;
     inBuff.size = 0;
     inBuff.pos = 0;
@@ -548,7 +548,9 @@ static int basicUnitTests(U32 seed, double compressibility)
     {   size_t const ret = ZSTD_decompressStream(zd, &outBuff, &inBuff);
         if (ret != 0) goto _output_error;
     }
+    DISPLAYLEVEL(3, "OK\n");
 
+    DISPLAYLEVEL(3, "test%3i : NULL output buffer with non-NULL input : ", testNb++);
     {
         const char* test = "aa";
         inBuff.src = test;