[#2840] Changing Resolv::DNS — Daniel Hobe <daniel@...>
I put out a RCR a while ago (176) that subclassed the Resolv::DNS class to
5 messages
2004/05/01
[#2853] cgi.rb: option to omit HTTP header emission — Jos Backus <jos@...>
I'm trying to use cgi.rb to write HTML-only output. This patch adds a
5 messages
2004/05/06
[#2867] ruby/dl — Jeff Mitchell <quixoticsycophant@...>
# dltest.rb
7 messages
2004/05/12
[#2878] Bug in open-uri under win32 (?) — Mauricio Fern疣dez <batsman.geo@...>
4 messages
2004/05/16
[#2894] RI for distribution — why the lucky stiff <ruby-core@...>
Hi, everyone.
6 messages
2004/05/18
[#2901] test/yaml/test_yaml.rb — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Hello.
2 messages
2004/05/19
[#2913] [yaml] YAML.load([1,2,3].to_yaml.to_yaml) — Jeff Mitchell <quixoticsycophant@...>
A bit contrived,
8 messages
2004/05/20
[#2926] Re: [bug] [yaml] YAML.load([1,2,3].to_yaml.to_yaml)
— "daz" <dooby@...10.karoo.co.uk>
2004/05/23
[#2927] Re: [bug] [yaml] YAML.load([1,2,3].to_yaml.to_yaml)
— ts <decoux@...>
2004/05/23
>>>>> "d" == daz <dooby@d10.karoo.co.uk> writes:
[#2928] Syck CVS (was Re: [bug] [yaml] YAML.load([1,2,3].to_yaml.to_yaml))
— why the lucky stiff <ruby-core@...>
2004/05/23
ts wrote:
[#2929] Re: Syck CVS (was Re: [bug] [yaml] YAML.load([1,2,3].to_yaml.to_yaml))
— ts <decoux@...>
2004/05/23
>>>>> "w" == why the lucky stiff <ruby-core@whytheluckystiff.net> writes:
[#2918] fixed SIG_SEGV in check_stack() in eval.c — b g <bg_rubyposter_123456@...>
I was getting a crash at 'JUMP_TAG(state);' in
6 messages
2004/05/22
[#2938] -Wstrict-prototypes for extensions — Jeff Mitchell <quixoticsycophant@...>
6 messages
2004/05/25
[BUG] ruby/dl
From:
Jeff Mitchell <quixoticsycophant@...>
Date:
2004-05-12 19:00:41 UTC
List:
ruby-core #2867
# dltest.rb
require 'dl/import'
module DLTest
extend DL::Importable
dlload "./dltest.so"
extern "void* dltest_func()"
end
srand(2727)
ptr = DLTest.dltest_func().to_i
puts "[ruby] got pointer: #{ptr}"
loop {
DL::PtrData.new(ptr)
}
__END__
# dltest.c
#include <stdio.h>
static const char* data = "konnichiwa" ;
void* dltest_func()
{
printf("[C] sending pointer: %d\n", (unsigned int)data) ;
return (void*)data ;
}
# Makefile
all : dltest.so
dltest.so : dltest.o
gcc -shared -Wall dltest.o -o dltest.so
dltest.o : dltest.c
gcc -c -fpic -Wall dltest.c -o dltest.o
clean :
rm -f dltest.o dltest.so
run : dltest.so
ruby -w dltest.rb
.PHONY: all clean run
--------------------------------------------------
output:
[C] sending pointer: 1073911707
[ruby] got pointer: 1073911707
dltest.rb:18: [BUG] Segmentation fault
ruby 1.9.0 (2004-05-12) [i686-linux]
--------------------------------------------------
Same result for ruby-1.8.1 and cvs up -r ruby_1_8.
For me, the segfault occurs on the 3737th iteration. Results may
vary. Changing the program slightly can make it segfault only within
a certain range, say 5000-8000 iterations, or cause memory to grow
without bound.
A simpler yet unorthodox example is:
require 'dl'
srand(2727)
FOO = "foo"
loop {
DL::PtrData.new(2*FOO.object_id) ;
}
Thanks to Mauricio for helping to further isolate the bug on
#ruby-lang IRC.
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861