On Wed, Oct 7, 2009 at 9:23 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Wed, Oct 07, 2009 at 08:25:17AM -0700, Joe Swatosh wrote:
>> Please help if you can. Since this commit the Ruby bindings tests are
>> segfaulting in
>> svn_client_diff4 in cancel_func in Release builds, but running fine in
>> Debug builds.
>> Since the test sets the cancel_func to nil I am lead to suspect an
>> uninitialized variable
>> somewhere, but I can't find it (or anything else).
>
> Can you provide a stack trace?
>
> Stefan
>
okay, this is what I get in the debugger with a release build:
00000000()
MSVCRT-RUBY18! 10040dc2()
MSVCRT-RUBY18! 100018e2()
MSVCRT-RUBY18! 10001707()
MSVCRT-RUBY18! 1000c9de()
MSVCRT-RUBY18! 1000ebcd()
callback(unsigned long 37728348) line 1577 + 23 bytes
MSVCRT-RUBY18! 1000c4e7()
callback_handle_error(unsigned long 37728312) line 1626 + 34 bytes
MSVCRT-RUBY18! 1000c755()
invoke_callback_handle_error(unsigned long 37728348, unsigned long
224, svn_error_t * * 0x023fb054) line 1653
svn_swig_rb_cancel_func(void * 0x04bbf2e8) line 2374 + 24 bytes
directory_elements_diff(dir_baton * 0x0446647d) line 810 + 6 bytes
close_directory(void * 0x02851cc4, apr_pool_t * 0x04cbc178) line 1331 + 6 bytes
close_directory(void * 0x04cbc170, apr_pool_t * 0x04bbf2e8) line 261 + 14 bytes
close_directory(void * 0x04cbc168, apr_pool_t * 0x04bbf2e8) line 261 + 14 bytes
drive(report_baton_t * 0x02921621, long 80462184, path_info_t *
0x00000001, apr_pool_t * 0x04a77e28) line 1200 + 12 bytes
finish_report(report_baton_t * 0x02921432, apr_pool_t * 0x04a77e28)
line 1259 + 27 bytes
svn_repos_finish_report(void * 0x04c042c0, apr_pool_t * 0x04bbf2e8)
line 1345 + 18 bytes
reporter_finish_report(void * 0x04be94f0, apr_pool_t * 0x04bbf2e8)
line 210 + 18 bytes
svn_wc_crawl_revisions5(svn_wc_context_t * 0x028ed9e5, const char *
0x04a77830, const svn_ra_reporter3_t * 0x04be97e0, void * 0x03a5f820
ra_local_reporter, int 79598832, int 0, int 78084192, int 1, int 0,
svn_error_t * (void *, const char *, const svn_string_t *, const
svn_string_t *, int, apr_pool_t *)* 0x00000000, void * 0x00000000,
...) line 945 + 19 bytes
diff_repos_wc(const char * 0x028ecdd1, const svn_opt_revision_t *
0x039f85c8, const svn_opt_revision_t * 0x023fb45c, const char *
0x023fb35c, const svn_opt_revision_t * 0x04bbf470, int 79633544, int
0, int 3, const apr_array_header_t * 0x00000000, const
svn_wc_diff_callbacks4_t * 0x00000000, diff_cmd_baton * 0x023fb2dc,
svn_client_ctx_t * 0x023fb324, apr_pool_t * 0x04a07a70) line 1
do_diff(const diff_parameters * 0x023fb2fc, const
svn_wc_diff_callbacks4_t * 0x023fb2dc, diff_cmd_baton * 0x023fb324,
svn_client_ctx_t * 0x04a07a70, apr_pool_t * 0x04bbf2e8) line 1491 + 62
bytes
svn_client_diff5(const apr_array_header_t * 0x04bbf348, const char *
0x039f85c8, const svn_opt_revision_t * 0x023fb45c, const char *
0x039f85c8, const svn_opt_revision_t * 0x023fb44c, const char *
0x00000000, int 3, int 0, int 0, int 0, int 0, const char *
0x00000001, apr_file_t * 0x04bbf368, apr_file_t * 0x04bed4d0, const
apr_array_header_t * 0x00000000, svn_client_ctx_t * ...) li
svn_client_diff4(const apr_array_header_t * 0x04bbf348, const char *
0x039f85c8, const svn_opt_revision_t * 0x023fb45c, const char *
0x039f85c8, const svn_opt_revision_t * 0x023fb44c, const char *
0x00000000, int 3, int 0, int 0, int 0, const char * 0x00000001,
apr_file_t * 0x04bbf368, apr_file_t * 0x04bed4d0, const
apr_array_header_t * 0x00000000, svn_client_ctx_t * ...) line 636
_wrap_svn_client_diff4(int 268491310, unsigned long * 0x0000000f,
unsigned long 73869720) line 10906
MSVCRT-RUBY18! 1000da2e()
NTDLL! 773971e6()
NTDLL! 77396e0c()
90909090()
00df7d80()
ed57850f()
90c3fffb()
90909090()
I added some traces this is a run of a debug build:
svn_client.c:23003 is where the cancel_func is set to nil (4)
test_client.rb:775 is right before the call to diff4
test_client.rb:775 is right after the call to diff4
swigutil_rb.c:2367 is near the top of svn_swig_rb_cancel_func
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:764"
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\svn_client.c:23003
4
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:766"
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:775"
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
c:\users\joe-swatosh\documents\svn\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:777"
The same traces from a release build doesn't make it to the end of diff4:
swigutil_rb.c:2370 svn_swig_rb_cancel_func forwards when the proc is
not nil so we shouldn't make it here at all.
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:764"
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\svn_client.c:23003
4
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:766"
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
"C:/Users/joe-swatosh/Documents/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:775"
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2367
C:\Users\joe-swatosh\Documents\SVN\src-trunk\subversion\bindings\swig\ruby\libsvn_swig_ruby\swigutil_rb.c:2370:not
NIL
./svn/util.rb:86: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Thanks for looking into this,
--
Joe
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404782
Received on 2009-10-08 07:36:29 CEST