summaryrefslogtreecommitdiff
path: root/marshal.c
AgeCommit message (Collapse)Author
2014-12-01use 0 for reservednobu
use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-24marshal.c: literal method namesnobu
* marshal.c (check_dump_arg, check_load_arg): use literal method names, instead of converting from ID every time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18* internal.h: Gather declarations in non-header files.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* internal.h: Include ruby.h and ruby/encoding.h to beakr
includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14symbol.c: rename rb_str_dynamic_internnobu
* iseq.c, marshal.c, string.c: use rb_str_intern instead of rb_str_dynamic_intern. * symbol.c (rb_str_intern): rename rb_str_dynamic_intern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-01marshal.c: lazy compat_tbl allocationnormal
In some common cases, compat_tbl is unused in dump_arg/load_arg, so avoid malloc/free costs for the unused table. ruby -e 'h = {a: :b}; 600000.times { Marshal.load(Marshal.dump(h)) }' before: real 0m2.458s user 0m2.450s sys 0m0.006s after: real 0m2.122s user 0m2.110s sys 0m0.011s * marshal.c (w_class): check dump_arg->compat_tbl before lookup (w_object): lazy init ->compat_tbl before insert (obj_alloc_by_class): ditto (clear_dump_arg): free only non-NULL ->compat_tbl (clear_load_arg): ditto for ->compat_tbl (marshal_dump): ->compat_tbl defaults to zero (marshal_load): ditto for ->compat_tbl (r_entry0): check l->compat_tbl before lookup (r_fixup_compat): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-28ruby.h: warn untyped Datanobu
* include/ruby/ruby.h (rb_data_object_alloc_warning): warn Data_Wrap_Struct and Data_Make_Struct only if RUBY_UNTYPED_DATA_WARNING is set to 1. * include/ruby/ruby.h (rb_data_object_get_warning): ditto for Data_Get_Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27ruby.h: deprecate plain Datanobu
* include/ruby/ruby.h (rb_data_object_alloc_deprecated): deprecate Data_Make_Struct and Data_Wrap_Struct. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-29marshal.c: fix symlink indexnobu
* marshal.c (w_symbol): fix symlink index. register the given symbols, not its name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-28marshal.c: fix instance variable load odrdernobu
* marshal.c (r_symreal): fix instance variable load odrder, its name must be read before its value. the order of function call arguments is not stable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-28symbols instead of IDsnobu
* encoding.c (rb_enc_get_index): deal with symbols instead of IDs to get rid of inadvertent pin-downs. * enum.c (chunk_ii): ditto. * enumerator.c (append_method): ditto. * iseq.c (iseq_load): ditto. * marshal.c (w_symbol, r_symlink, r_symreal, r_symbol): ditto. * signal.c (trap_handler): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-19* internal.h (struct RBignum): Use size_t for len.akr
* include/ruby/intern.h (rb_big_new): Use size_t instead of long to specify the size of bignum. (rb_big_resize): Ditto. * bignum.c: Follow above changes. * rational.c: Follow above changes. * marshal.c: Follow above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-13* bignum.c (SIZEOF_BDIGIT): Renamed from SIZEOF_BDIGITS.akr
* internal.h: Ditto. * marshal.c: Ditto. * rational.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-12marshal.c: remove hack for old gccnobu
* marshal.c (r_object0): remove hack for old gcc, no gcc 2.x any more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26marshal.c: undumpable hidden objectsnobu
* marshal.c (w_object): internal objects are not dumpable. [ruby-core:61677] [Bug #9674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17marshal.c: do not recycle wrapper objectsnobu
* marshal.c (marshal_dump, marshal_load): do not recycle wrapper objects, to prevent from segfault with continuation. [ruby-dev:47970] [Bug #9523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16marshal.c: use rb_gc_force_recycle for GC-safetynormal
Putting rb_gc_force_recycle at the end of the function has a nice side-effect of keeping wrapper visible to GC until the moment of recycle, preventing GC from prematurely killing live objects. volatile is a common source of compiler bugs/differences, avoid it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15* internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO.akr
(BIGNUM_EMBED_LEN_NUMBITS): Renamed from RBIGNUM_EMBED_LEN_NUMBITS. (BIGNUM_EMBED_LEN_MAX): Renamed from RBIGNUM_EMBED_LEN_MAX. (BIGNUM_SIGN_BIT): Renamed from RBIGNUM_SIGN_BIT. (BIGNUM_SIGN): Renamed from RBIGNUM_SIGN. (BIGNUM_SET_SIGN): Renamed from RBIGNUM_SET_SIGN. (BIGNUM_POSITIVE_P): Renamed from RBIGNUM_POSITIVE_P. (BIGNUM_NEGATIVE_P): Renamed from RBIGNUM_NEGATIVE_P. (BIGNUM_EMBED_FLAG): Renamed from RBIGNUM_EMBED_FLAG. (BIGNUM_EMBED_LEN_MASK): Renamed from RBIGNUM_EMBED_LEN_MASK. (BIGNUM_EMBED_LEN_SHIFT): Renamed from RBIGNUM_EMBED_LEN_SHIFT. (BIGNUM_LEN): Renamed from RBIGNUM_LEN. (RBIGNUM_DIGITS): Renamed from RBIGNUM_DIGITS. (BIGNUM_LENINT): Renamed from RBIGNUM_LENINT. * bignum.c: Follow the above change. * gc.c: Ditto. * marshal.c: Ditto. * math.c: Ditto. * numeric.c: Ditto. * random.c: Ditto. * rational.c: Ditto. * sprintf.c: Ditto. * ext/-test-/bignum/bigzero.c: Ditto. * ext/-test-/bignum/intpack.c: Ditto. * ext/bigdecimal/bigdecimal.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13* marshal.c: fix typo by @xta [fix GH-533] [ci skip]hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-08marshal.c: Numerics are not taintednobu
* include/ruby/ruby.h (OBJ_TAINTABLE, OBJ_TAINT, OBJ_INFECT), marshal.c (r_entry0): all Numerics never be tainted now. [ruby-core:57346] [Bug #8945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05pack.c: hide associated objectsnobu
* marshal.c (to_be_skipped_id): ignore anonymous attributes. * pack.c (Init_pack): use anonymous ID so that associated objects do not appear in the packed result. * parse.y (rb_make_internal_id): return an anonymous ID for internal use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05marshal.c: refine special instance variablesnobu
* marshal.c (w_obj_each, obj_count_ivars): count instance variables accurately. * marshal.c (encoding_name, w_encoding): separate getting encoding values and writing them. * marshal.c (w_symbol, w_ivar, w_objivar, w_object): refine special instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05marshal.c: preserve encodingnobu
* marshal.c (must_not_be_anonymous, class2path): preserve encoding in the exception messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 * marshal.c: [DOC] Wordsmith marshal.c documentation. by @vipulnsward ↵hsbt
[fix GH-470] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23* marshal.c (w_object): Use HASH_PROC_DEFAULT directly from internal.htmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko1
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
2013-06-25* bignum.c (MSB): Removed.akr
(BDIGIT_MSB): Defined using BIGRAD_HALF. (bary_2comp): Apply BIGLO after possible over flow of BDIGIT. (get2comp): Ditto. (bary_unpack_internal): Use BDIGIT_MSB. Apply BIGLO after possible over flow of BDIGIT. (rb_integer_unpack): Use BDIGIT_MSB. (calc_hbase): Use BDIGMAX. (big2dbl): Use BDIGMAX. Apply BIGLO after possible over flow of BDIGIT. (rb_big_neg): Apply BIGLO after possible over flow of BDIGIT. (biglsh_bang): Ditto. (bigrsh_bang): Ditto. (bary_divmod): Use BDIGIT_MSB. (bigdivrem): Ditto. (bigxor_int): Apply BIGLO after possible over flow of BDIGIT. * marshal.c (shortlen): Use SIZEOF_BDIGITS instead of sizeof(BDIGIT). * ext/openssl/ossl_bn.c (ossl_bn_initialize): Use SIZEOF_BDIGITS instead of sizeof(BDIGIT). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h: support write barrier protection for T_STRUCT.ko1
Introduce the following C APIs: * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk). The type of returned pointer is (const VALUE *). * RSTRUCT_GET(st, idx) returns idx-th value of struct. * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB. And * RSTRUCT_PTR(st) returns pointer with shady operation. The type of returned pointer is (VALUE *). * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
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
2013-06-11* internal.h (INTEGER_PACK_NEGATIVE): Defined.akr
(rb_integer_unpack): sign argument removed. * bignum.c (rb_integer_unpack): sign argument removed. Non-negative integers generated by default. INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers. * pack.c (pack_unpack): Follow the above change. * random.c (int_pair_to_real_inclusive): Ditto. (make_seed_value): Ditto. (mt_state): Ditto. (limited_big_rand): Ditto. * marshal.c (r_object0): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08* marshal.c (r_object0): Use rb_integer_unpack.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04* marshal.c (r_object0): Generalize a round up expression.akr
Use BDIGIT instead of int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02fill rdocsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26* hash.c, include/ruby/ruby.h: support WB protected hash.ko1
* constify RHash::ifnone and make new macro RHASH_SET_IFNONE(). * insert write barrier for st_update(). * include/ruby/intern.h: declare rb_hash_set_ifnone(hash, ifnone). * marshal.c (r_object0): use RHASH_SET_IFNONE(). * ext/openssl/ossl_x509name.c (Init_ossl_x509name): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c: support RGENGC. [ruby-trunk - Feature #8339]ko1
See this ticet about RGENGC. * gc.c: Add several flags: * RGENGC_DEBUG: if >0, then prints debug information. * RGENGC_CHECK_MODE: if >0, add assertions. * RGENGC_PROFILE: if >0, add profiling features. check GC.stat and GC::Profiler. * include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0). * array.c: add write barriers for T_ARRAY and generate sunny objects. * include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if you want to access raw pointers. If you modify the contents which pointer pointed, then you need to care write barrier. * bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects. * complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX and generate sunny objects. * rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write barriers for T_RATIONAL and generate sunny objects. * internal.h: add write barriers for RBasic::klass. * numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects. * object.c (rb_class_allocate_instance), range.c: generate sunny T_OBJECT objects. * string.c: add write barriers for T_STRING and generate sunny objects. * variable.c: add write barriers for ivars. * vm_insnhelper.c (vm_setivar): ditto. * include/ruby/ruby.h, debug.c: use two flags FL_WB_PROTECTED and FL_OLDGEN. * node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED): move flag bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02marshal.c: no overwriting ivarsnobu
* marshal.c (copy_ivar_i): get rid of overwriting already copied instance variales. c.f. [Bug #8276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-22marshal.c: fix marshal_load ivarnobu
* marshal.c (r_object0): copy all instance variables not only generic ivars, before calling post proc. [ruby-core:51163] [Bug #7627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20marshal.c: use ivars of marshal_dump datanobu
* marshal.c (w_object): dump no ivars to the original by marshal_dump. [ruby-core:54334] [Bug #8276] * marshal.c (r_object0): copy all ivars of marshal_dump data to the result object instead. [ruby-core:51163] [Bug #7627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-19marshal.c: no duplicated encodingnobu
* marshal.c (w_object): do not dump encoding which is dumped with marshal_dump data. [ruby-core:54334] [Bug #8276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21* marshal.c (marshal_dump, marshal_load): workaround for segv onngoto
Intel Solaris compiled with Oracle SolarisStudio 12.3. Partly revert r38174. [ruby-core:52042] [Bug #7805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-09marshal.c: check for prependednobu
* marshal.c (w_extended): check for prepended object. [ruby-core:53206] [Bug #8043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-08marshal.c: prepended objectsnobu
* marshal.c (r_object0): load prepended objects. treat the class of extended object in the included modules as prepended singleton class. [ruby-core:53202] [Bug #8041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-01* marshal.c: add security considerations to marshal overview, refer tocharliesome
overview from Marshal.load documentation [#7759] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-01marshal.c: prohibit_ivarnobu
* marshal.c (r_object0): prohibit setting instance variables of exising class/module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-31marshal.c: warn against using Marshal.load on untrusted datacharliesome
* marshal.c (marshal_load): Add documentation warning against using Marshal.load on untrusted data [Bug #7759] [ruby-core:51765] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26marshal.c: marshal_dump instance varialbesnobu
* marshal.c (w_object): dump instance varialbes of the result of marshal_dump not the original object. [ruby-core:51163] [Bug #7627] * complex.c (nucomp_marshal_dump): need to copy instance variables. * rational.c (nurat_marshal_dump): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-20marshal.c: get back to the old behaviornobu
* marshal.c (w_object, r_object0): separate respond_to checks and calling, and get back to the old behavior for 2.0. [Bug #7564] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23marshal.c: rb_check_funcall_with_hooknobu
* vm_eval.c (rb_check_funcall_with_hook): rb_check_funcall with hook which is called before calling method_missing or target method. * marshal.c (w_object, r_object0): use rb_check_funcall_with_hook instead of respond_to? and call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e