Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-218

segfault when including boost share_ptr header (proposed workaround / patch)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P4: Low
    • 6.0
    • 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.2.x
    • Shiboken
    • Ubuntu Saucy, Ubuntu Trusty, Arch Linux

    Description

      I have created a minimal example for which shiboken (1.1.2 and newer) segfault. The same code worked fine with version 1.1.1 and older.

      The example can be found here: https://github.com/dirk-thomas/shiboken_segfault_with_boost Just clone the repo and invoke the test script. On Ubuntu Saucy with Shiboken 1.1.2 as well as Ubuntu Trusty with Shiboken 1.2.1 it segfaults for me - on Ubuntu Quantal with Shiboken 1.1.1 it passes.

      Could it be related to the following problem in code? In
      https://qt.gitorious.org/pyside/shiboken/source/a527dd51e69b80c2d5be3a1d8cd60ab2b2616fa5:ApiExtractor/abstractmetabuilder.cpp#L223 the first argument is accessed without checking that it actually exists.

      We just added a simple "fix" to avoid the usage of unavailable arguments using the following check before that line:

      if (arguments.size() == 0) return;

      I have no knowledge about the internals of Shiboken and can't judge if that is the "right" thing to do. But at least the invocation does not segfault anymore with this.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ctismer Christian Tismer
              dirk-thomas Dirk Thomas
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes