Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-99

accessing some request or server object members causes a segfault

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.2.7
    • 3.2.7
    • core
    • None

    Description

      Martin Devara discovered a segfault when accessing some request object members. For example:

      def handler(req):
      req.content_type = "text/plain"
      req.write("EE\n")
      a = getattr(req,"allowed_methods");
      return apache.OK

      Futher investigation revealed problems with several getter functions in requestobject.c and serverobject.c. The root of the problem seems to be pointer dereferencing errors in the getter code. The affected functions and the members which use them are:

      src/requestobject.c
      getreq_rec_ml
      allowed_methods

      getreq_rec_ah
      content_languages
      allowed_xmethods

      src/serverobject.c
      getsrv_recmbr_ah
      names
      wild_names

      Martin has provided a patch to fix the bug.

      (Thanks to Martin for tracking this down and providing the fix.)

      Attachments

        1. md-20051209.diff
          1 kB
          James Paul Gallacher

        Activity

          People

            jgallacher James Paul Gallacher
            jgallacher James Paul Gallacher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: