Project

General

Profile

Bug #4258

valgrind ./ruby -ve ''

Added by akr (Akira Tanaka) almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-dev:43000]

Description

=begin
以下のように、ruby -ve '' としたときに、
不適切なアクセスが valgrind で検出されます。

% valgrind ./ruby -ve ''
==15880== Memcheck, a memory error detector
==15880== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==15880== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h
for copyright info
==15880== Command: ./ruby -ve
==15880==
ruby 1.9.3dev (2011-01-10 trunk 30506) [x86_64-linux]
==15880== Invalid read of size 4
==15880== at 0x41EA2B: slot_sweep (gc.c:1961)
==15880== by 0x4203FE: gc_sweep (gc.c:2106)
==15880== by 0x42048D: rb_objspace_free (gc.c:411)
==15880== by 0x4DF935: ruby_vm_destruct (vm.c:1550)
==15880== by 0x4197F1: ruby_cleanup (eval.c:208)
==15880== by 0x419964: ruby_run_node (eval.c:265)
==15880== by 0x4168FA: main (main.c:38)
==15880== Address 0x5c6bb3c is 300 bytes inside a block of size 944 free'd
==15880== at 0x4C240FD: free (vg_replace_malloc.c:366)
==15880== by 0x4DF912: ruby_vm_destruct (vm.c:1542)
==15880== by 0x4197F1: ruby_cleanup (eval.c:208)
==15880== by 0x419964: ruby_run_node (eval.c:265)
==15880== by 0x4168FA: main (main.c:38)
==15880==
==15880==
==15880== HEAP SUMMARY:
==15880== in use at exit: 257,954 bytes in 4,810 blocks
==15880== total heap usage: 16,418 allocs, 11,608 frees, 2,564,952
bytes allocated
==15880==
==15880== LEAK SUMMARY:
==15880== definitely lost: 208 bytes in 3 blocks
==15880== indirectly lost: 176 bytes in 2 blocks
==15880== possibly lost: 0 bytes in 0 blocks
==15880== still reachable: 257,570 bytes in 4,805 blocks
==15880== suppressed: 0 bytes in 0 blocks
==15880== Rerun with --leak-check=full to see details of leaked memory
==15880==
==15880== For counts of detected and suppressed errors, rerun with: -v
==15880== ERROR SUMMARY: 40 errors from 1 contexts (suppressed: 4 from 4)
--
[田中 哲][たなか あきら][Tanaka Akira]
=end

History

#1

Updated by akr (Akira Tanaka) almost 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30522.
Akira, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF