Project

General

Profile

Bug #10749

Possible overflow in GC::Profiler report on 2.2.0

Added by kgrz (Kashyap K) almost 5 years ago. Updated almost 5 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:67638]

Description

I've been trying out the GC::Profiler module on both Ruby 2.1.0 and Ruby 2.2.0 based on the
sample code present at https://rubybench.org and noticed a oddity in the output of GC::Profiler.report
on Ruby 2.2.0. The code snippet I was experimenting with was the IO/File read present
at https://rubybench.org/ruby/ruby/releases?result_type=io_file_read

The output of GC::Profiler.report has a possible overflow bug which causes it to output a really
large value at some locations for that sample code and this issue is reproducible if the same
code is run. I've posted the sample code and the report results for both Ruby 2.1.0 and Ruby 2.2.0
at this link: https://github.com/kgrz/gc_profiles

Notice the "Use Size" value's output in Ruby 2.2.0 for two runs:

Run 1: https://github.com/kgrz/gc_profiles/blob/master/2.2.0-read.txt
Run 2: https://github.com/kgrz/gc_profiles/blob/master/2.2.0-read-run-two.txt

History

Updated by kgrz (Kashyap K) almost 5 years ago

I've been trying out the GC::Profiler and noticed an oddity in the report generated on Ruby 2.2.0
via GC::Profiler.report. The report generated outputs a really large value under Use Size header
on 2.2.0 but this is not present in 2.1.0. This particular large value remains the same (as far I've
tested it in multiple runs) across different runs.

I've posted the sample code and the report results for both Ruby 2.1.0 and Ruby 2.2.0
at this link: https://github.com/kgrz/gc_profiles

Notice the Use Size column's output in Ruby 2.2.0 in two runs:

Run 1: https://github.com/kgrz/gc_profiles/blob/master/2.2.0-read.txt
Run 2: https://github.com/kgrz/gc_profiles/blob/master/2.2.0-read-run-two.txt

Also available in: Atom PDF