Project

General

Profile

Actions

Bug #16019

closed

please backport df317151a5b4e0c5a30fcc321a9dc6abad63f7ed

Added by wanabe (_ wanabe) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
[ruby-core:93907]

Description

TracePoint#enable can cause SEGV without df317151a5b4e0c5a30fcc321a9dc6abad63f7ed on ruby_2_6.

$ ((cd ../../; git checkout .); make install-nodoc -j4) >/dev/null 2>&1
$ ruby -v -e 'def foo; TracePoint.new(:b_return, &:disable).enable(target: method(:bar)); end;def bar; 100.times{ foo; foo }; end; bar'
ruby 2.6.3p65 (2019-06-22 revision 67712) [x86_64-linux]
double free or corruption (fasttop)
Aborted (core dumped)
$

But it can't with df317151a5b4e0c5a30fcc321a9dc6abad63f7ed.

$ ((cd ../../; git checkout .; git show df317151a5b4e0c5a30fcc321a9dc6abad63f7ed vm_trace.c|patch -p1); make install-nodoc -j4) >/dev/null 2>&1
$ ruby -v -e 'def foo; TracePoint.new(:b_return, &:disable).enable(target: method(:bar)); end;def bar; 100.times{ foo; foo }; end; bar'
ruby 2.6.3p65 (2019-06-22 revision 67712) [x86_64-linux]
$

I think ruby_2_5 doesn't need the commit because TracePoint#enable accepts "target:" since 2.6.

Actions #1

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN to 2.5: UNKNOWN, 2.6: REQUIRED
Actions #2

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Backport changed from 2.5: UNKNOWN, 2.6: REQUIRED to 2.5: DONTNEED, 2.6: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Backport changed from 2.5: DONTNEED, 2.6: REQUIRED to 2.5: DONTNEED, 2.6: DONE

ruby_2_6 r67744 merged revision(s) df317151a5b4e0c5a30fcc321a9dc6abad63f7ed.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0