[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: APR hash order ruby test failure

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 29 Mar 2012 11:55:42 +0100

Joe Swatosh <joe.swatosh_at_gmail.com> writes:

> From that perspective, it seems to me that the best approach is to use
> the Set in the test, but not in the bindings themselves. Also the
> current APIs don't provide order guarantees (obviously), but if they
> started to guarantee order in the future, the Set may be a bad choice
> in the interface.

That sounds reasonable. The bindings test currently cause a Ruby SEGV
if APR is built with pool debugging enabled:

#1 <signal handler called>
#2 0x00007ffff5bffa91 in apr_hash_next (hi=0x737190) at tables/apr_hash.c:134
#3 0x00007ffff62be912 in c2r_hash_with_key_convert (hash=0x737180,
    key_conv=0x7ffff62bcbc9 <c2r_string>, key_ctx=0x0,
    value_conv=0x7ffff62bc8f6 <svn_swig_rb_from_swig_type>,
    value_ctx=0x7ffff653a530)
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1432
#4 0x00007ffff62be9ed in c2r_hash (hash=0x737180,
    value_conv=0x7ffff62bc8f6 <svn_swig_rb_from_swig_type>, ctx=0x7ffff653a530)
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1452
#5 0x00007ffff62bea65 in svn_swig_rb_apr_hash_to_hash_swig_type (
    hash=0x737180, type_name=0x7ffff653a530 "svn_log_changed_path_t *")
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1470
#6 0x00007ffff64e2f40 in _wrap_svn_log_entry_t_changed_paths_get (argc=0,
    argv=0x0, self=140737217253200)
    at subversion/bindings/swig/ruby/core.c:5695
#7 0x00007ffff7b1c0ae in ?? () from /usr/lib/libruby1.8.so.1.8

(gdb) down
#3 0x00007ffff62be912 in c2r_hash_with_key_convert (hash=0x737180,
    key_conv=0x7ffff62bcbc9 <c2r_string>, key_ctx=0x0,
    value_conv=0x7ffff62bc8f6 <svn_swig_rb_from_swig_type>,
    value_ctx=0x7ffff653a530)
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1432
1432 for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi)) {
(gdb) p hash[0]
$3 = {pool = 0x0, array = 0x51, iterator = {ht = 0x737180, this = 0x0,
    next = 0x0, index = 1}, count = 0, max = 0, seed = 1094795585,
  hash_func = 0x4141414141414141, free = 0x4141414141414141}

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-03-29 12:56:24 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.