Bug #10749
closedPossible overflow in GC::Profiler report on 2.2.0
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