Skip to content

ZJIT: stackprof can't read large exit location dumps #781

@tekknolagi

Description

@tekknolagi
plum% stackprof ./benchmarks/lobsters/zjit_exit_locations.dump
/Users/emacs/.gem/ruby/ruby-zjit-rel-stats/gems/stackprof-0.2.27/lib/stackprof/report.rb:13:in 'IO.binread': Invalid argument @ io_fread - ./benchmarks/lobsters/zjit_exit_locations.dump (Errno::EINVAL)
        from /Users/emacs/.gem/ruby/ruby-zjit-rel-stats/gems/stackprof-0.2.27/lib/stackprof/report.rb:13:in 'StackProf::Report.from_file'
        from /Users/emacs/.gem/ruby/ruby-zjit-rel-stats/gems/stackprof-0.2.27/bin/stackprof:78:in '<top (required)>'
        from /Users/emacs/.rubies/ruby-zjit-rel-stats/lib/ruby/3.5.0+4/rubygems.rb:303:in 'Kernel#load'
        from /Users/emacs/.rubies/ruby-zjit-rel-stats/lib/ruby/3.5.0+4/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
        from /Users/emacs/.gem/ruby/ruby-zjit-rel-stats/bin/stackprof:25:in '<main>'
plum%

We shouldn't be making such large files but also stackprof shouldn't be reading the entire file into memory just to check the first couple bytes before doing a Marshal.load

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions