aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
Commit message (Collapse)AuthorAgeFilesLines
* vm_trace.c: isolate exceptionsnobu2013-12-171-0/+3
| | | | | | | | * vm_trace.c (rb_postponed_job_flush): isolate exceptions in postponed jobs and restore outer ones. based on a patch by tarui. [ruby-core:58652] [Bug #9168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_suppress_tracing): Fix initialization of stacktmm12013-12-041-0/+1
| | | | | | | | allocated rb_trace_arg_t structure. Without this patch, sometimes INTERNAL_EVENT_GC would be skipped accidentally inside rb_threadptr_exec_event_hooks_orig(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: skip "exception check" and "reentrant check (only normalko12013-11-261-51/+82
| | | | | | | | | events) for internal events. Reentrant check for internal events are remaining. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: prohibit to specify normal events and internal eventsko12013-11-261-1/+7
| | | | | | | | | | | simultaneously. I will introduce special care for internal events later. * ext/-test-/tracepoint/tracepoint.c: test this behavior. * test/-ext-/tracepoint/test_tracepoint.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (symbol2event_flag): add secret feature.ko12013-11-101-0/+2
| | | | | | | | | add a_call/a_return events. a_call is call | b_call | c_call, and same as a_return. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: isolate errinfo in trace blocksnobu2013-11-071-0/+1
| | | | | | | | * vm_trace.c (rb_threadptr_exec_event_hooks_orig): errinfo should not be propagated to trace blocks so that no argument raise does not throw internal objects. [ruby-dev:47793] [Bug #9088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko12013-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (tp_free): remvoed because empty free function.ko12013-10-291-7/+1
| | | | | | | | Use RUBY_TYPED_NEVER_FREE instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: exterminate Zombies.ko12013-10-221-20/+49
| | | | | | | | | | | | | | | | | | | | | | | There is a bug that T_ZOMBIE objects are not collected. Because there is a pass to miss finalizer postponed job with multi-threading. This patch solve this issue. * vm_trace.c (rb_postponed_job_register_one): set RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job is registered. There is a possibility to remain a postponed job without interrupt flag. * vm_trace.c (rb_postponed_job_register_one): check interrupt carefully. * vm_trace.c (rb_postponed_job_register_one): use additional space to avoid buffer full. * gc.c (gc_finalize_deferred_register): check failure. * thread.c (rb_threadptr_execute_interrupts): check `postponed_job_interrupt' immediately. There is a possibility to miss this flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_flush): fix bit operation.ko12013-10-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_flush): simplify.ko12013-10-111-39/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r43248. Should not set interrupt_flag.ko12013-10-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: use macronobu2013-10-101-1/+1
| | | | | | * vm_trace.c (rb_postponed_job_flush): use dedicated macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: suppress warningsnobu2013-10-101-6/+6
| | | | | | | * vm_trace.c (rb_postponed_job_flush): suppress clobbered variable warnings on some gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: fix infinite hooknobu2013-10-101-11/+38
| | | | | | | | | | * thread.c (rb_threadptr_execute_interrupts): flush postponed job only once at last. * vm_trace.c (rb_postponed_job_flush): defer calling postponed jobs registered while flushing to get rid of infinite reentrance of ObjectSpace.after_gc_start_hook. [ruby-dev:47400] [Bug #8492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (postponed_job): use preallocated buffer.ko12013-10-101-18/+49
| | | | | | | | | | | | | Pre-allocate MAX_POSTPONED_JOB (1024) sized buffer and use it. If rb_postponed_job_register() cause overflow, simply it fails and returns 0. And maybe rb_postponed_job_register() is signal safe. * vm_core.h: change data structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: [DOC] Fix TracePoint return values in exampleszzak2013-08-051-5/+5
| | | | | | | | Based on a patch by @sho-h [Fixes GH-373] https://github.com/ruby/ruby/pull/373 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo2013-06-121-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_register_one): fix iteration bug.ko12013-05-271-0/+1
| | | | | | | | | * ext/-test-/postponed_job/postponed_job.c, test/-ext-/postponed_job/test_postponed_job.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_flush): remove a wrong comment.ko12013-05-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE toko12013-05-271-1/+1
| | | | | | | | | | | RUBY_INTERNAL_EVENT_FREEOBJ. * ext/-test-/tracepoint/tracepoint.c, ext/objspace/object_tracing.c, gc.c, vm_trace.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typotmm12013-05-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_flush, rb_postponed_job_register): useko12013-05-271-2/+2
| | | | | | | | ruby_xmalloc/xfree. It is safe during GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, gc.c, vm_trace.c: add internal events.ko12013-05-271-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | * RUBY_INTERNAL_EVENT_NEWOBJ: object created. * RUBY_INTERNAL_EVENT_FREE: object freeed. * RUBY_INTERNAL_EVENT_GC_START: GC started. And rename `RUBY_EVENT_SWITCH' to `RUBY_INTERNAL_EVENT_SWITCH'. Internal events can not invoke any Ruby program because the tracing timing may be critical (under huge restriction). These events can be hooked only by C-extensions. We recommend to use rb_potponed_job_register() API to call Ruby program safely. This change is mostly written by Aman Gupta (tmm1). https://bugs.ruby-lang.org/issues/8107#note-12 [Feature #8107] * include/ruby/debug.h, vm_trace.c: added two new APIs. * rb_tracearg_event_flag() returns rb_event_flag_t of this event. * rb_tracearg_object() returns created/freeed object. * ext/-test-/tracepoint/extconf.rb, ext/-test-/tracepoint/tracepoint.c, test/-ext-/tracepoint/test_tracepoint.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/debug.h, vm_trace.c: add rb_postponed_job API.ko12013-05-261-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | Postponed jobs are registered with this API. Registered jobs are invoked at `ruby-running-safe-point' as soon as possible. This timing is completely same as finalizer timing. There are two APIs: * rb_postponed_job_register(flags, func, data): register a postponed job with data. flags are reserved. * rb_postponed_job_register_one(flags, func, data): same as `rb_postponed_job_register', but only one `func' job is registered (skip if `func' is already registered). This change is mostly written by Aman Gupta (tmm1). https://bugs.ruby-lang.org/issues/8107#note-15 [Feature #8107] * gc.c: use postponed job API for finalizer. * common.mk: add dependency from vm_trace.c to debug.h. * ext/-test-/postponed_job/extconf.rb, postponed_job.c, test/-ext-/postponed_job/test_postponed_job.rb: add a test. * thread.c: implement postponed API. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* id.def: predefined IDsnobu2013-05-021-1/+1
| | | | | | | * defs/id.def: add more predefined IDs used in core. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prefix global symbolsnobu2013-03-061-1/+1
| | | | | | | | | | | | | | * iseq.c (rb_insn_operand_intern): prefix global symbols. * numeric.c (ruby_num_interval_step_size): ditto. * vm_backtrace.c (rb_vm_backtrace_str_ary), (rb_vm_backtrace_location_ary, rb_vm_thread_backtrace), (rb_vm_thread_backtrace_locations): ditto. * vm_trace.c (rb_vm_trace_mark_event_hooks): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: Note about TracePoint events set, and comment onzzak2013-02-091-19/+32
| | | | | | | Kernel#set_trace_func to prefer new TracePoint API git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_binding_new_with_cfp): permit to create binding objectko12013-02-051-1/+2
| | | | | | | | | | | | | | | | | | | | of IFUNC frame. When `rb_binding_new_with_cfp()' is called, VM finds out the first normal (has iseq) frame and create a binding object of this frame and create Env objects. `ep's of related frames are updated (`ep's point Env object managed spaces). However, `ep' of skipped IFUNC frame was not updated and old invalid `ep' was remained. It causes serious problems. To solve this issue, permit IFUNC to create binding. (Maybe there is no problem on it) [ruby-dev:46908] [ruby-trunk - Bug #7774] * test/ruby/test_settracefunc.rb: add a test. * vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added. * vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_backtrace.c: fix issue of rb_debug_inspector_open().ko12013-01-291-2/+0
| | | | | | | | | | | | | | | | | | | The order of making binding should be stack (frame) top to bottom. [Bug #7635] And also fix issue of collecting klass. Collecting klass is same as TracePoint#defined_class. (previous version, it returns T_ICLASS (internal objects). * test/-ext-/debug/test_debug.rb: add a test. * ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto. * vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*. * vm_backtrace.c, include/ruby/debug.h: add new C api (experimental) rb_debug_inspector_frame_self_get(). * vm.c, vm_core.h, vm_trace.c: move decl. of rb_vm_control_frame_id_and_class() and constify first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: TracePoint safe level checknobu2013-01-291-2/+8
| | | | | | | | * vm_trace.c (rb_tracepoint_enable, rb_tracepoint_disable): check safe level as well as set_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: trace_func safe level checknobu2013-01-291-0/+6
| | | | | | | | * vm_trace.c (set_trace_func, thread_{add,set}_trace_func_m): check safe level as well as 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.ko12013-01-071-0/+1
| | | | | | | | | | | | This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL. This event is experimental one. It is possible to remove/rename flag name after 2.0.1. * vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was occurred. `:specified_line' never been returned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag beforeko12013-01-071-1/+6
| | | | | | | | | | | | JUMP_TAG() if frame is `finish' frame. Without this patch, there is an inconsistency between control frame stack and tags stack. [Bug #7668] * test/ruby/test_settracefunc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_threadptr_exec_event_hooks_and_pop_frame):ko12012-12-251-2/+15
| | | | | | | | | | | | | | | | | pop a frame before JUMP_TAG() if exception occurred. This change fix bug of Ruby 1.9. [ruby-core:51128] [ruby-trunk - Bug #7624] * vm_core.h (EXEC_EVENT_HOOK_AND_POP_FRAME): add to use `rb_threadptr_exec_event_hooks_and_pop_frame()'. * vm.c (vm_exec): use EXEC_EVENT_HOOK_AND_POP_FRAME() while exception handling. While exception hadnling, if an exception is raised in hooks, need to pop current frame and raise this raised exception by hook. * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (tracepoint_new): add code to support specified thread.ko12012-12-211-3/+6
| | | | | | | | But not tested and this feature is not supported officially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, vm_trace.c: fix multi-threading bug for tracing.ko12012-12-211-84/+63
| | | | | | | | | | | | | | | | | | | | | | | Move `trace_arg' from rb_tp_t::trace_arg to rb_thread_t::trace_arg. `trace_arg' may changed by multiple threads. rb_thread_t::trace_arg can represent rb_thread_t::trace_running (null or non-null) and rb_thread_t::trace_running is removed. After that, `rb_tp_t' is not needed to check tracing or not (A running thread knows tracing or not). This is why I remove tp_attr_check_active() and make new function get_trace_arg(). And this modification disable to work the following code: TracePoint.trace{|tp| Thread.new{p tp.event} # access `tp' from other threads. } I believe nobody mix threads at trace procedure. This is current limitation. * cont.c (fiber_switch, rb_cont_call): use rb_thread_t::trace_arg instead of rb_thread_t::trace_running. * test/ruby/test_settracefunc.rb: add a multi-threading test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: stylenobu2012-12-211-2/+2
| | | | | | * vm_trace.c (rb_suppress_tracing): adjust style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_suppress_tracing): remove unused variable 'vm_tracing'tarui2012-12-201-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_suppress_tracing): bugfix for vm->trace_runningtarui2012-12-201-2/+4
| | | | | | | | counter. And if tracing is already true, vm_trace_running ops is skipped to control overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_threadptr_exec_event_hooks): get rid of racetarui2012-12-191-2/+2
| | | | | | | condition. [Bug #7589] [ruby-dev:46763] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r38371 and r38384. they didn't solve the issuenaruse2012-12-191-5/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (tracepoint_attr_defined_class): Clean up rdoc forzzak2012-12-181-26/+28
| | | | | | | TracePoint#defined_class git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (fill_id_and_klass): TracePoint#defined_class returnsko12012-12-171-4/+30
| | | | | | | | | | | | | | | | | | | | singleton class. `set_trace_func' passed attached class (which is attached/modified by singleton class) by 6th block parameter if it is singleton class. Previous behavior follows this spec. However, this method named `defined_class' should return singleton class directly because singleton methods are defined in singleton class. There are no compatible issue because TracePoint is introduced after 2.0. But compatiblity with `set_trace_func' is brokne. This means that you can not replace all `set_trace_func' code with TracePoint without consideration of this behavior. [Bug #7554] * test/ruby/test_settracefunc.rb: change a test to catch up an above chagne. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: suppress warningnobu2012-12-141-1/+2
| | | | | | | * vm_trace.c (exec_hooks): suppress unused-variable warning by RB_UNUSED_VAR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (exec_hooks): add volatile to avoid segv.naruse2012-12-141-1/+4
| | | | | | | On test-all with -j, it may crash in TH_POP_TAG. Detailed mechanism is not known but this fixes it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: pass exceptions while handling an exceptionnobu2012-12-111-1/+5
| | | | | | | | | * vm.c (vm_exec): pass exceptions while handling an exception. * vm_trace.c (rb_threadptr_exec_event_hooks): propagate exceptions. revert r38293 partially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: exceptions in event hooksnobu2012-12-101-7/+3
| | | | | | | * vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event hooks should not propagate outside. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typozzak2012-12-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: TracePoint#enable should not cause an errorko12012-12-061-26/+31
| | | | | | | | | | when it is already enabled. TracePoint#disable is too. [ruby-core:50561] [ruby-trunk - Bug #7513] * test/ruby/test_settracefunc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e