#1117: Garbage collection issues -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Install: {{{ % git clone git@github.com:alloy/mocha-on-bacon.git Initialized empty Git repository in /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/.git/ remote: Counting objects: 42, done. remote: Compressing objects: 100% (34/34), done. remote: Total 42 (delta 13), reused 0 (delta 0) Receiving objects: 100% (42/42), 8.15 KiB, done. Resolving deltas: 100% (13/13), done. % cd mocha-on-bacon % sudo macgem install mac_bacon Password: Successfully installed mac_bacon-1.1.21 1 gem installed % sudo macgem install mocha --format-executable Successfully installed rake-0.8.7 Successfully installed mocha-0.9.10 2 gems installed }}} Running with GC, results in: {{{ % macbacon spec/mocha-on-bacon_spec.rb Bacon specs using Mocha, with a mock - passes when all expectations were fulfilled - fails when not all expectations were fulfilled - fails when there is an unexpected invocation - passes when the mockee receives all expected parametersmacruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c90420)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c903c0)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug - fails when the mockee receives unexpected parameters and complains about not being satisfiedmacruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative- block}[96](0x200c9b8c0)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c9b800)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c9b620)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c903c0)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c9f200)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bee780 while assigning {conservative-block}[96](0x200c9b620)[16] = RBSpecification[32](0x200bee780) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bee780 while assigning {conservative-block}[96](0x200c903c0)[16] = RBSpecification[32](0x200bee780) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bee780 while assigning {conservative-block}[96](0x200c9f200)[16] = RBSpecification[32](0x200bee780) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug [FAILED] - fails when the mockee receives unexpected parameters and complains about the unexpected parameters Bacon specs using Mocha, with a stubmacruby(90645,0x105181000) malloc: resurrection error for object 0x200bdeb20 while assigning {conservative- block}[96](0x200c97140)[16] = RBSpecification[32](0x200bdeb20) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bdeb20 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200bdeb20) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bdeb20 while assigning {conservative-block}[96](0x200c97020)[16] = RBSpecification[32](0x200bdeb20) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug [MISSING] macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8c920 while assigning {conservative-block}[96](0x200c97140)[16] = RBSpecification[32](0x200c8c920) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8c920 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200c8c920) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8c920 while assigning {conservative-block}[96](0x200c97020)[16] = RBSpecification[32](0x200c8c920) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug [MISSING] macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c93fc0)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c97140)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c97020)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug - passes when all Stubba expectations are fulfilled [MISSING] - fails when not all Stubba expectations were fulfilled [MISSING] Bacon::Error: /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:426:in `satisfy': Bacon specs using Mocha, with a mock - fails when the mockee receives unexpected parameters and complains about not being satisfied /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:409:in `have:' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/spec /mocha-on-bacon_spec.rb:37:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:158:in `block' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:30:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:195:in `execute_block_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:28:in `execute_block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:154:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/bin/macbacon:118:in `<main>' /usr/bin/macbacon:19:in `<main>' Bacon::Error: empty specification: Bacon specs using Mocha, with a stub passes when all Stubba expectations are fulfilled /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `block': Bacon specs using Mocha, with a stub - passes when all Stubba expectations are fulfilled /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:30:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:195:in `execute_block_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:28:in `execute_block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:242:in `context_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:284:in `specification_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:190:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/bin/macbacon:118:in `<main>' /usr/bin/macbacon:19:in `<main>' Bacon::Error: empty specification: Bacon specs using Mocha, with a stub fails when not all Stubba expectations were fulfilled /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `block': Bacon specs using Mocha, with a stub - fails when not all Stubba expectations were fulfilled /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:30:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:195:in `execute_block_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:28:in `execute_block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:242:in `context_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:284:in `specification_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:190:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/bin/macbacon:118:in `<main>' /usr/bin/macbacon:19:in `<main>' 8 specifications (6 requirements), 1 failures, 0 errors }}} However, with GC disabled everything is fine: {{{ % GC_DISABLE=true macbacon spec/mocha-on-bacon_spec.rb Bacon specs using Mocha, with a mock - passes when all expectations were fulfilled - fails when not all expectations were fulfilled - fails when there is an unexpected invocation - passes when the mockee receives all expected parameters - fails when the mockee receives unexpected parameters and complains about not being satisfied - fails when the mockee receives unexpected parameters and complains about the unexpected parameters Bacon specs using Mocha, with a stub - passes when all Stubba expectations are fulfilled - fails when not all Stubba expectations were fulfilled 8 specifications (8 requirements), 0 failures, 0 errors }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1117> MacRuby <http://macruby.org/>