Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0447-erts-Silence-CodeChecker-in-erts_encode_ex...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0447-erts-Silence-CodeChecker-in-erts_encode_ext_dist_hea.patch of Package erlang
From d758e62d1ab8ba4b9919a16ba0df10b575148f38 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Mon, 22 Feb 2021 20:49:40 +0100 Subject: [PATCH 07/10] erts: Silence CodeChecker in erts_encode_ext_dist_header_finalize --- erts/emulator/beam/external.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c index ac9c8f4b9e..e071fa08a5 100644 --- a/erts/emulator/beam/external.c +++ b/erts/emulator/beam/external.c @@ -497,7 +497,7 @@ Sint erts_encode_ext_dist_header_finalize(ErtsDistOutputBuf* ob, int iix, flgs_bytes, flgs_buf_ix, used_half_bytes; ErtsAtomCache* cache = dep->cache; #ifdef DEBUG - int tot_used_half_bytes; + int tot_used_half_bytes, top_buf_ix; #endif flgs_bytes = ERTS_DIST_HDR_ATOM_CACHE_FLAG_BYTES(ci); @@ -562,9 +562,13 @@ Sint erts_encode_ext_dist_header_finalize(ErtsDistOutputBuf* ob, } ASSERT(tot_used_half_bytes == 2*flgs_bytes); flgs_buf[flgs_buf_ix] = flgs; +#ifdef DEBUG + top_buf_ix = flgs_buf_ix; +#endif flgs_buf_ix = 0; while (1) { - flgs = flgs_buf[flgs_buf_ix]; + ASSERT(flgs_buf_ix <= top_buf_ix); + flgs = flgs_buf[flgs_buf_ix]; if (flgs_bytes > 4) { *--ep = (byte) ((flgs >> 24) & 0xff); *--ep = (byte) ((flgs >> 16) & 0xff); @@ -574,6 +578,7 @@ Sint erts_encode_ext_dist_header_finalize(ErtsDistOutputBuf* ob, flgs_bytes -= 4; } else { + ASSERT(flgs_buf_ix == top_buf_ix); switch (flgs_bytes) { case 4: *--ep = (byte) ((flgs >> 24) & 0xff); -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor