[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

rehash segfault

From: Nathaniel Talbott <nathaniel@...>
Date: 2004-02-24 18:04:27 UTC
List: ruby-core #2494
I don't have a lot of information on this bug at this point, but 
figured I'd throw out what I do have, and see if it's enough to jog 
someone's brain. I'll of course continue to gather more information as 
I'm able and present it here.

I have code that looks like this in my application:

   @cache = Set::new
   def @cache.rehash
     @hash.rehash
   end

@cache.rehash is called whenever the cache is modified. I've gotten the 
following segfault twice (in days of running):

   /usr/lib/ruby/site_ruby/1.8/se/server/db/cache.rb:18: [BUG] 
Segmentation fault
   ruby 1.8.1 (2003-12-25) [i386-linux]

cache.rb line 18 is the @hash.rehash line. My ruby is configured as:

   $ ruby -rrbconfig -e'p Config::CONFIG["configure_args"]'
   "'--host=i386-linux' '--build=i386-linux' '--prefix=/usr' 
'--mandir=/usr/share/man'
   '--infodir=/usr/share/info' '--enable-pthread' 'CFLAGS=-g' 
'build_alias=i386-linux'
   'host_alias=i386-linux'"

My guess is that either there is some combination of keys and/or size 
that triggers a rehash bug, or rehash is not completely thread-safe. 
Any ideas?

TIA,


Nathaniel

<:((><


In This Thread

Prev Next