diff --git a/.github/workflows/ci-large.yml b/.github/workflows/ci-large.yml index 793993b18..87aef14ce 100644 --- a/.github/workflows/ci-large.yml +++ b/.github/workflows/ci-large.yml @@ -113,7 +113,7 @@ jobs: wasmer: [3.1.1] v8: [12.0.267.17] ssl: [no_ssl, ssl] - debug: [debug, no_debug] + debug: [debug] uses: ./.github/workflows/job-clang-analyzer.yml with: cc: ${{ matrix.cc }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfb9f0e36..4bfeb4ac0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -261,7 +261,7 @@ jobs: wasmer: [3.1.1] v8: [12.0.267.17] ssl: [ssl] - debug: [debug, no_debug] + debug: [debug] include: # No SSL - os: ubuntu-latest diff --git a/src/common/proxy_wasm/ngx_proxy_wasm_host.c b/src/common/proxy_wasm/ngx_proxy_wasm_host.c index 591dd9f0a..76a5c5b95 100644 --- a/src/common/proxy_wasm/ngx_proxy_wasm_host.c +++ b/src/common/proxy_wasm/ngx_proxy_wasm_host.c @@ -373,7 +373,7 @@ ngx_proxy_wasm_hfuncs_get_buffer(ngx_wavm_instance_t *instance, if (start == NULL) { ngx_wa_assert(cl); - if (cl->next == NULL) { + if (cl && cl->next == NULL) { /* single buffer */ start = cl->buf->pos; } @@ -388,6 +388,7 @@ ngx_proxy_wasm_hfuncs_get_buffer(ngx_wavm_instance_t *instance, ngx_wa_assert(cl); ngx_wa_assert(cl->buf); ngx_wa_assert(cl->next); + len = 0; for (/* void */; cl; cl = cl->next) { diff --git a/src/common/shm/ngx_wasm_shm_queue.c b/src/common/shm/ngx_wasm_shm_queue.c index 2b90f8563..55093602e 100644 --- a/src/common/shm/ngx_wasm_shm_queue.c +++ b/src/common/shm/ngx_wasm_shm_queue.c @@ -216,8 +216,12 @@ ngx_wasm_shm_queue_pop_locked(ngx_wasm_shm_t *shm, ngx_str_t *data_out, } inc_ptr(queue, &queue->pop_ptr, sizeof(uint32_t)); + + ngx_wa_assert(buf); + circular_read(shm->log, queue, queue->pop_ptr, buf, len); inc_ptr(queue, &queue->pop_ptr, len); + queue->rising_occupancy = 0; data_out->data = buf; diff --git a/src/wasm/ngx_wasm_util.c b/src/wasm/ngx_wasm_util.c index 5c67d5746..4731d38de 100644 --- a/src/wasm/ngx_wasm_util.c +++ b/src/wasm/ngx_wasm_util.c @@ -105,7 +105,9 @@ ngx_wasm_chain_clear(ngx_chain_t *in, size_t offset, unsigned *eof, if (pos < offset) { fill = offset - pos; +#if (NGX_DEBUG) pos += fill; +#endif } ngx_wa_assert(pos == offset);