Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  beam/external: don't blow assert on encounter with a magic binary
  • Loading branch information
jhogberg committed Nov 8, 2023
2 parents 8ba0bc2 + 2b4191f commit ae17cd7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions erts/emulator/beam/external.c
Original file line number Diff line number Diff line change
Expand Up @@ -4015,8 +4015,12 @@ store_in_vec_aux(TTBEncodeContext *ctx,
Uint iov_len;
ErlIOVec *feiovp;

ASSERT(((byte *) &bin->orig_bytes[0]) <= ptr);
ASSERT(ptr + len <= ((byte *) &bin->orig_bytes[0]) + bin->orig_size);
#ifdef DEBUG
if (!(bin->intern.flags & BIN_FLAG_MAGIC)) {
ASSERT(((byte *) &bin->orig_bytes[0]) <= ptr);
ASSERT(ptr + len <= ((byte *) &bin->orig_bytes[0]) + bin->orig_size);
}
#endif

if (ctx->frag_ix >= 0) {
feiovp = &ctx->fragment_eiovs[ctx->frag_ix];
Expand Down

0 comments on commit ae17cd7

Please sign in to comment.