Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1632

Patch to fix Stability issues and memory leaks on hash keys

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 1.7.0
    • core/engine

    Description

      Hash seems to keep a pointer to the keys of the elements it stores.Right now that memory is managed by the caller of the method... In some cases it causes a memory leak, but as the key memory is external to the hash it is a potential segfault (I think this could be related to other existing segfaults which are difficult to identify)

      I proposed a patch to create a copy of the key for the hash to use (the hash releases that memory automatically when freed)...

      I looked trough all the code to correct the calls to axutil_hash_set() in order to unify the memory management, and runned all the samples to check it worked correctly (I know hash it's used in a lot of places)

      Please review the patch to see if any changes need to be done on it...

      Attachments

        1. axis2c-1632.patch
          14 kB
          Alex Mantaut
        2. hash2_interface.patch
          220 kB
          Alex Mantaut

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexmantaut Alex Mantaut
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: