Merge pull request #8195 from HannahShiSFB/gRPC-Ruby-issue-on-Windows

[Ruby] Fix: (SIGSEGV) gRPC-Ruby issue on Windows. memory alloc infinite recursion/run out of memory
pull/8202/head
Joshua Haberman 4 years ago committed by GitHub
commit 7165c34606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ruby/ext/google/protobuf_c/upb.c

@ -2357,7 +2357,7 @@ static void upb_arena_addblock(upb_arena *a, void *ptr, size_t size,
}
static mem_block *upb_arena_allocblock(upb_arena *a, size_t size) {
size_t block_size = UPB_MAX(size, a->next_block_size) + sizeof(mem_block);
size_t block_size = UPB_MAX(size, a->next_block_size) + _upb_arena_alignup(sizeof(mem_block));
mem_block *block = upb_malloc(a->block_alloc, block_size);
if (!block) {

Loading…
Cancel
Save