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

Possible Bug (perl bindings)?

From: Andrew Melo <andrewm_at_world-of-frags.com>
Date: 2006-06-03 07:32:08 CEST

Hey All-

I am writing an application with under win32, and I've run into a number
of bugs I think have to do with the perl bindings. I have:

perl 5.8.8 (This is perl, v5.8.8 built for MSWin32-x86-multi-thread)
SVN/Perl bindings 1.3.1

One error that is sporadic and difficult to reproduce is the "Attempting
to free an unreferenced scalar" error. I can cause it in my application,
but every time I try to make a simplified test case, it goes away *shrug*

Another error that is reproducible though is this:

Argument "Test Log Message" isn't numeric in subroutine entry at
c:/vanilla-perl/perl/site/lib/SVN/Core.pm line 417.

After that, the perl interpreter segfaults.

"Test Log Message" is the value returned by the log_msg callback. Below
is the script that causes the error, and after that I have pasted the
output of the script. If I comment out the line that sets the log_msg
callback, the error doesn't occur (although, nothing happens to the
repository, so it's not really an option)

Thanks in advance-

use strict;
use warnings;

use SVN::Client;
use SVN::Core;
use Data::Dumper;
print STDERR "SVN Version: " . $SVN::Core::VERSION ."\n";
main->mkdir ( 'clients/1' );
main->delete( 'clients/1' );

sub _getClient {
        my $ctx = new SVN::Client();
        $ctx->log_msg( \&log_msg );
        return $ctx;

# XXX replace this
sub getSVNRepos { return "file:///f:/mine/dev/wofpanel/svnrepos/"; }

sub mkdir {
        my $self = shift;
        my $dir = shift;
        my $ctx = _getClient();
        $ctx->mkdir([getSVNRepos() . $dir]);

sub delete {
        my $self = shift;
        my $del = shift;

        my $ctx = _getClient();
        $ctx->delete([getSVNRepos() . $del],1);

sub log_msg {
        print "Incoming Log: " . Dumper \@_;
        my $logmsg = "Test Log Message";
        $_[0] = \$logmsg;

F:\mine\dev\wofpanel\backend\bin>perl svnerror.pl
SVN Version: 1.3.1
Incoming Log: $VAR1 = [
             bless( do{\(my $o = 12984552)}, _p_svn_client_commit_item_t' )
           bless( do{\(my $o = 12894264)}, '_p_apr_pool_t' )
Incoming Log: $VAR1 = [
             bless( do{\(my $o = 13063752)}, '_p_svn_client_commit_item_t' )
           bless( do{\(my $o = 13006264)}, '_p_apr_pool_t' )
Argument "Test Log Message" isn't numeric in subroutine entry at
/perl/site/lib/SVN/Core.pm line 417.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 3 07:29:03 2006

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