Skip to content

Commit

Permalink
Merge pull request #8195 from HannahShiSFB/gRPC-Ruby-issue-on-Windows
Browse files Browse the repository at this point in the history
[Ruby] Fix: (SIGSEGV) gRPC-Ruby issue on Windows. memory alloc infinite recursion/run out of memory
  • Loading branch information
haberman committed Jan 8, 2021
2 parents 10599e6 + 68f72f3 commit 7165c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ruby/ext/google/protobuf_c/upb.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 7165c34

Please sign in to comment.