Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4613

Perl bindings: SVN::Core::dirent_canonicalize segfaults on undef

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.3
    • None
    • bindings_swig_perl
    • None
    • GNU/Linux (Debian/unstable).

    Description

      SVN::Core::dirent_canonicalize segfaults on undef:

      $ perl -MSVN::Core -e 'SVN::Core::dirent_canonicalize(undef)'
      zsh: segmentation fault (core dumped)  perl -MSVN::Core -e 'SVN::Core::dirent_canonicalize(undef)'
      

      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?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            vinc17 Vincent Lefevre

            Dates

              Created:
              Updated:

              Slack

                Issue deployment