summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2004-10-20* string.c (str_gsub): reentrant check. [ruby-dev:24432]matz
* backport all SEGV bug fixes from CVS HEAD. [ruby-dev:24536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-27* gc.c (run_final): wrong order of data. [ruby-dev:23948]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-23* gc.c (define_final): should not disclose NODE* to Ruby world.matz
[ruby-dev:23957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-14* gc.c, parse.y, lib/cgi.rb, lib/date.rb: last minute backports from HEAD.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-29* eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.nobu
* gc.c (define_final, run_final): preserve and restore safe level for finalizers. [ruby-core:03058] * signal.c (signal_exec, rb_trap_exit, trap): preserve and restore safe level for signal handlers. [ruby-dev:23829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-24* eval.c (rb_thread_atfork): remove "fork terminates thread"matz
warning. [ruby-dev: * object.c (rb_obj_clone): backport FL_FINALIZE patch from 1.9. [ruby-core:02786][ruby-core:03067] * ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname() should give us packed address, not struct sockaddr. [ruby-core:03053] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-16* gc.c (stack_grow_direction): memoize the direction.nobu
* gc.c (Init_stack): should always move to end of VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-12* gc.c (rb_gc_copy_finalizer): typo. [ruby-core:02774]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22Add RDoc commentsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-20dln.c: remove last second typo.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-13* eval.c (thread_timer): use timer by sub-thread and nanosleep.matz
[ruby-talk:87519] * gc.c (Init_stack): no stack adjustment for THREAD_SAFE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10* io.c (read_all): should return given string even if data read ismatz
empty. [ruby-dev:22207] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28* gc.c (gc_mark): explicitly check mark recursion levels, insteadmatz
of unreliable stack length. * file.c (path_check_1): honor sticky bits always. [ruby-talk:86273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27* eval.c, gc.c: FreeBSD/ia64 currently does not have a way for aknu
process to get the base address for the RSE backing store, so hardcode it for the moment. [submitted by: Marcel Moolenaar <marcel@FreeBSD.org>] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22* gc.c (Init_stack): stack region is far smaller than usual ifmatz
pthread is used. * marshal.c (w_extended): singleton methods should not be checked when dumping via marshal_dump() or _dump(). [ruby-talk:85909] * file.c (getcwdofdrv): avoid using getcwd() directly, use my_getcwd() instead. * merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine <sunshine@sunshineco.com>. [ruby-core:01596] * marshal.c (w_object): LINK check earlier than anything else, i.e. do not dump TYPE_IVAR for already dumped objects. (ruby-bugs PR#1220) * eval.c (rb_eval): call "inherited" only when a new class is generated; not on reopening. * eval.c (eval): prepend error position in evaluating string to * configure.in: revived NextStep, OpenStep, and Rhapsody ports which had become unbuildable; enhanced --enable-fat-binary option so that it accepts a list of desired architectures (rather than assuming a fixed list), or defaults to a platform-appropriate list if user does not provide an explicit list; made the default list of architectures for MAB (fat binary) more comprehensive; now uses -fno-common even when building the interpreter (in addition to using it for extensions), thus allowing the interpreter to be embedded into a plugin module of an external project (in addition to allowing embedding directly into an application); added checks for <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now ensures that -I/usr/local/include is employed when extensions' extconf.rb scripts invoke have_header() since extension checks on NextStep and OpenStep will fail without it if the desired resource resides in the /usr/local tree; fixed formatting of --help message. * Makefile.in: $(LIBRUBY_A) rule now deletes the archive before invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives (see configure's --enable-fat-binary option); added rule for new missing/getcwd.c. * defines.h: fixed endian handling during MAB build (see configure's --enable-fat-binary option) to ensure that all portions of the project see the correct WORDS_BIGENDIAN value (some extension modules were getting the wrong endian setting); added missing constants GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H define in NeXT section. * dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on NextStep since, on some installations, this value always resolves uselessly to zero. * dln.c: added error reporting to NextStep extension loader since the previous behavior of failing silently was not useful; now ensures that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice on Rhapsody since this header lacks multiple-include protection, which resulted in "redefinition" compilation errors. * main.c: also create hard reference to objc_msgSend() on NeXT platforms (in addition to Apple platforms). * lib/mkmf.rb: now exports XCFLAGS from configure script to extension makefiles so that extensions can be built MAB (see configure's --enable-fat-binary option); also utilize XCFLAGS in cc_command() (but not cpp_command() because MAB flags are incompatible with direct invocation of `cpp'). * ext/curses/extconf.rb: now additionally checks for presence of these curses functions which are not present on NextStep or Openstep: bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(), setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(), wscrl(), wsetscrreg() * ext/curses/curses.c: added appropriate #ifdef's for additional set of curses functions now checked by extconf.rb; fixed curses_bkgd() and window_bkgd() to correctly return boolean result rather than numeric result; fixed window_getbkgd() to correctly signal an error by returning nil rather than -1. * ext/etc/etc.c: setup_passwd() and setup_group() now check for null pointers before invoking rb_tainted_str_new2() upon fields extracted from `struct passwd' and `struct group' since null pointers in some fields are common on NextStep/OpenStep (especially so for the `pw_comment' field) and rb_tainted_str_new2() throws an exception when it receives a null pointer. * ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). * ext/socket/getaddrinfo.c: cast first argument of getservbyname(), gethostbyaddr(), and gethostbyname() from (const char*) to non-const (char*) for older platforms such as NextStep and OpenStep. * ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(); include <netinet/in_systm.h> if present for NextStep and OpenStep; cast first argument of gethostbyaddr() and getservbyname() from (const char*) to non-const (char*) for older platforms. * ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* configure.in: always check existence of the pthread librarynagai
* ruby.h: define macros for ruby's native thread check * eval.c: add ruby's native thread check * gc.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-20* gc.c (gc_sweep): loosen page free condition to avoid add_heap()matz
race condition. [ruby-dev:21633] * gc.c (gc_sweep): do not update malloc_limit when malloc_increase is smaller than malloc_limit. * ext/socket/socket.c (make_hostent): h_aliases may be NULL. (ruby-bugs PR#1195) * ext/socket/socket.c (sock_s_gethostbyaddr): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06* parse.y (stmt): rhs of multiple assignment should not bematz
expanded using "to_a". [ruby-dev:21527] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04* gc.c (Init_stack): the type of space is changed to unsigned inteban
from double. [ruby-dev:21483] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01* gc.c (heaps): manage slots and limits together. [ruby-dev:21453]nobu
* gc.c (add_heap): should not clear heaps slot even if realloc() failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-22* enum.c (inject_i): use rb_yield_values.matz
* enum.c (each_with_index_i): ditto. * eval.c (rb_yield_splat): new function to call "yield *values". * string.c (rb_str_scan): use rb_yield_splat(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-14* gc.c (id2ref): recycle check should be done by klass == 0.matz
[ruby-core:01408] * eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028] * parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs. * parse.y (lhs): ditto. * parse.y (yylex): should return tCOLON3 right after kCLASS. [ruby-talk:78918] * error.c (exc_initialize): was converting argument to string too eagerly. Only check was needed. [ruby-talk:78958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-14* gc.c (rb_data_object_alloc): check type of 1st argument.usa
[ruby-dev:21192] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06* eval.c (rb_call0): update ruby_class as well as ruby_cref.matz
(ruby-bugs-ja PR#540) * eval.c (rb_yield_0): remove ruby_frame->cbase and unify to ruby_cref. [ruby-talk:78141] * eval.c: initialize /* OK */ variables by Qnil to stop warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06* gc.c: FreeBSD/ia64's mcontext_t is a bit different from that ofknu
Linux/ia64. This makes gc.c compile but miniruby coredumps for the moment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-02* gc.c: add "#pragma weak" for __libc_ia64_register_backing_store_base.matz
[ruby-dev:21072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01* gc.c (rb_gc_mark_locations): no need to swap arguments.nobu
* gc.c (STACK_LENGTH): insufficient for growing up stack architectures. * gc.c (rb_gc, Init_stack) ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01* gc.c (rb_gc): typo.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01* ext/syck/rubyext.c (syck_emitter_write_m): forgot to declarematz
"self", making it default to "int". * ext/syck/rubyext.c (syck_emitter_simple_write): ditto. * gc.c (rb_gc): should mark backing store region on IA64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-31* gc.c (Init_stack): wrong magic number.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-31* gc.c (Init_stack): IA64 requires STACK_LEVEL_MAX to be less thanmatz
magic number when optimizer turned on, regardless of rlimit values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25* ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz
uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gc.c (run_final): backout unnecessary modifies.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* eval.c (thgroup_add): no warning for terminated threads.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17* eval.c (rb_clear_cache_by_class): check both klass and origin.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17* eval.c (ruby_init): set ruby_running to true aftermatz
initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-07* eval.c (rb_call_super): k->super maybe NULL if klass is Kernel.matz
[ruby-dev:20519] * gc.c (obj_free): clear method cache when freeing class/module. * eval.c (rb_mod_remove_method): allow "remove_method" to accept multiple arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-28* configure.in (rb_cv_stack_grow_dir): check stack growing direction.nobu
* eval.c (rb_thread_restore_context): prior configuration macro. * gc.c (ruby_stack_length): always return the address of lower edge. * gc.c (rb_gc_mark_locations): remove margin. [ruby-dev:20462] * gc.c (rb_gc, Init_stack): prior configuration macro. * gc.c (Init_stack): add safety margin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16* eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz
class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-07* parse.y (value_expr0): class and module statements should not bematz
warned for "void value expression". [ruby-talk:72989] * gc.c (add_final): should determine type by respond_to? * gc.c (define_final): ditto. * io.c (rb_io_ctl): should not depend on respond_to? * range.c (range_step): rb_check_string_type(). * process.c (proc_setgroups): new functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* gc.c (define_final): eliminate rb_f_lambda() call.matz
* class.c (rb_scan_args): ditto. * signal.c (sig_trap): ditto. * hash.c (rb_hash_initialize): ditto. * variable.c (rb_f_trace_var): ditto. * ext/dl/dl.c (rb_dl_callback): ditto. * ext/win32ole/win32ole.c (ev_on_event): ditto. * eval.c (ruby_cleanup): $SAFE is turned off in the finalization. Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-22* gc.c (run_final): use rb_thread_critical instead of DEFER_INTS.matz
[ruby-dev:20272] * marshal.c: try to make ArgumentError and TypeError consistent. [ruby-core:01068] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-21* error.c (syserr_initialize): prohibit specifying errno formatz
subclasses of SystemCallError. in addition, if initialize is called for SystenCallError instance, its class be changed. [ruby-dev:20257] * gc.c (run_final): to protect thread context switch, finalizers are wrapped in DEFER_INTS/ENABLE_INTS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-08* gc.c (rb_gc): check odd alignment stack on m68k machines.matz
* numeric.c (num_step): better error treatment of float values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-25* gc.c: STACK_LEVEL_MAX=65535 on mswince.uema2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-21* gc.c (rb_gc): use rb_gc_mark_maybe() to mark registered Cmatz
addresses. C variables may not hold valid reference to Ruby objects. [ruby-core:00975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09* gc.c (rb_gc_mark_children): introduce this function again; thismatz
is required when stack was very tight. [ruby-talk:68916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09* bignum.c (BIGZEROP): macro to determine if x is a bignum zero.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-26* eval.c (avalue_splat): new function to do unary * (splat)matz
operator. * eval.c (avalue_to_svalue,svalue_to_avalue,svalue_to_mrhs): do not use implicit "to_ary" conversion. * ext/curses/curses.c (GetWINDOW,GetMOUSE): add taint check. * ext/curses/curses.c (curses_init_screen): ditto. * ext/curses/curses.c (window_initialize): ditto. * gc.c (os_each_obj): prohibit ObjectSpace#each_object in safe mode ($SAFE >= 4). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e