Project

General

Profile

Bug #16019

please backport df317151a5b4e0c5a30fcc321a9dc6abad63f7ed

Added by wanabe (_ wanabe) 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
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.

#1

Updated by nagachika (Tomoyuki Chikanaga) 8 months ago

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

Updated by nagachika (Tomoyuki Chikanaga) 8 months ago

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

Updated by nagachika (Tomoyuki Chikanaga) 8 months 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.

Also available in: Atom PDF