Project

General

Profile

This project is closed and read-only.

Actions

Backport #9484

closed

Fix segfault at unpacking modified String

Backport #9484: Fix segfault at unpacking modified String

Added by nobu (Nobuyoshi Nakada) over 12 years ago. Updated over 12 years ago.


Description

trunkではr44803で修正済みですが、1.9.3以降2.1まで ([""].pack("p")<<"a").unpack("p") でSEGVします。
1.9.2までは起きないようです。


Related issues 1 (0 open — 1 closed)

Related to Backport21 - Backport #9478: Fix segfault at unpacking modified StringClosednaruse (Yui NARUSE)Actions

Updated by nobu (Nobuyoshi Nakada) over 12 years ago Actions #1 [ruby-dev:47954]

  • Related to Issue #9478 added

Updated by nagachika (Tomoyuki Chikanaga) over 12 years ago Actions #2 [ruby-dev:47969]

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset r45005.


merge revision(s) r44803: [Backport #9484]

* string.c (rb_str_modify_expand): enable capacity and disable
  assocation with packed objects when setting capa, so that
  pack("p") string fails to unpack properly after modified.
Actions

Also available in: PDF Atom