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

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

    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

          People

            Unassigned Unassigned
            vinc17 Vincent Lefevre
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: