summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2005-07-27* gc.c (obj_free): make message formant consistent with one frommatz
gc_mark(). [ruby-talk:149668] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27revered all LLP64 modifies due to portability reason.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27* gc.c (id2ref): must not assign pointers to long int. usematz
LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. [ruby-talk:149645] * ruby.h: use LONG_LONG to simplify the change. [ruby-talk:149645] * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. [ruby-talk:149553] * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit size pointer. [ruby-talk:149553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-19* gc.c (define_final): document fix: finalizers never get callednobu
before target object is destroyed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-19* gc.c (run_final): commit miss to add new variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-19* gc.c (run_final): reduce unnecessary object allocation duringnobu
finalization. * gc.c (rb_gc_call_finalizer_at_exit): deferred finalizers list should be cleared before calling them. fixed: [ruby-talk:145790] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-09* eval.c (ruby_longjmp): new macro to call longjmp, setcontext, etc.akr
(ruby_setjmp): new macro to call setjmp, getcontext, etc. (ruby_setjmp): call setjmp before getcontext to avoid IA64 register stack problem. [ruby-talk:144939] * gc.c (Init_stack): remove IA64_MAGIC_STACK_LIMIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-20* string.c (rb_str_new4): should propagate taintedness.matz
* struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-07* gc.c (mark_locations_array): avoid core dump with -O3.akr
[ruby-dev:25424] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20gcc noinline attribute is available since gcc-3.1.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-13* gc.c (stack_end_address): new function to obtain stack end address.akr
stack_end_address calls __builtin_frame_address(0) to obtain the frame pointer of a stack frame of stack_end_address. The address is the stack pointer of the caller's stack frame. (SET_STACK_END): use stack_end_address. This makes the conservative garbage collector to scan a stack frame of the garbage_collect function itself. This is required because callee-save registers may be stored in the frame. [ruby-dev:25158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-05* string.c (rb_str_locktmp): check STR_TMPLOCK flag beforematz
locking. [ruby-dev:24727] * gc.c (gc_mark): stricter GC stack check. * string.c (str_gsub): should have removed rb_str_unlocktmp(str). [ruby-dev:24708] * string.c (str_gsub): string modify check no longer based on tmplock. [ruby-dev:24706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04* gc.c (gc_mark): enable GC stack checking.matz
* string.c (str_gsub): lock strings temporarily. [ruby-dev:24687] * ext/socket/socket.c (s_recvfrom): tmplock input buffer. [ruby-dev:24705] * array.c (rb_ary_uniq_bang): do not push frozen string from hash table. [ruby-dev:24695] * array.c (rb_ary_and): ditto. * array.c (rb_ary_or): ditto. * ext/enumerator/enumerator.c (each_cons_i): pass copy of an internal consequent array. [ruby-talk:118691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-02* gc.c: cancel IA64 changes unnecessary for 1.8.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27* gc.c: prototype; rb_io_fptr_finalize() doesn't return any valueusa
at this version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27* gc.c (gc_sweep): recover ruby_in_compile variable.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27* string.c (RESIZE_CAPA): check string attribute before modifyingmatz
capacity member of string structure. [ruby-dev:24594] * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain performance. [ruby-talk:117701] * sprintf.c (rb_f_sprintf): raise ArgumentError for extra arguments, unless (digit)$ style used. * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain performance. [ruby-talk:117701] * sprintf.c (rb_f_sprintf): raise ArgumentError for extra arguments, unless (digit)$ style used. * eval.c (frame_free): Guy Decoux solved the leak problem. Thanks. [ruby-core:03549] * ext/zlib/zlib.c (zstream_append_input): clear klass for z->input to avoid potential vulnerability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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