[
https://issues.apache.org/jira/browse/SVN-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15114227#comment-15114227
]
Vincent Lefevre commented on SVN-4613:
--------------------------------------
Possibly a typemap related bug (unfortunately, I don't know anything about
swig).
> Perl bindings: SVN::Core::dirent_canonicalize segfaults on undef
> ----------------------------------------------------------------
>
> Key: SVN-4613
> URL: https://issues.apache.org/jira/browse/SVN-4613
> Project: Subversion
> Issue Type: Bug
> Components: bindings_swig_perl
> Affects Versions: 1.9.3
> Environment: GNU/Linux (Debian/unstable).
> Reporter: Vincent Lefevre
>
> {{SVN::Core::dirent_canonicalize}} segfaults on {{undef}}:
> {noformat}
> $ perl -MSVN::Core -e 'SVN::Core::dirent_canonicalize(undef)'
> zsh: segmentation fault (core dumped) perl -MSVN::Core -e
> 'SVN::Core::dirent_canonicalize(undef)'
> {noformat}
> In case of undef, I suppose that the Perl module should pass an empty string
> to the library (for which there are no errors), or return some other kind of
> error.
> In the binding generation, I suspect that undef is regarded as a null
> pointer. This is fine if the library function accepts a null pointer, but if
> the function expects a character string like here, undef should be regarded
> as the empty string as usual in Perl (or an error). Couldn't the code have
> enough information so that swig generates the right bindings?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)