Project

General

Profile

Bug #11123

[PATCH] bsock_recmvsg_internal needs GC guard for control buffer

Added by normalperson (Eric Wong) over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:69082]

Description

The control buffer may be used throughout the function, so
prevent the string from being lost to GC.

I'm pretty sure this is correct and we'll need it, I'll commit in a day or two
unless I missed something. I was planning to introduce new features before
I noticed this bug:

  • "exception: false"
  • explicit buffer reuse to reduce GC, similar to read_nonblock(num, str)

I also feel 4K buffers are too big for stack and should use heap instead
(as ALLOCV caps stack allocations at 1K)


Files

#1

Updated by Anonymous over 5 years ago

  • Status changed from Open to Closed

Applied in changeset r50449.


ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard

The control buffer may be used throughout the function, so
prevent the string from being lost to GC.

  • ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard [Bug #11123]
#2

Updated by usa (Usaku NAKAMURA) about 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED

ruby_2_1 r50584 merged revision(s) 50449.

Updated by nagachika (Tomoyuki Chikanaga) about 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE

Backported into ruby_2_2 branch at r50631.

Also available in: Atom PDF