Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.7.0
    • None
    • core/engine

    Description

      It seems that axutil_hash was modified to have a reference of the environment, but its use is not consistent across the hash interface...

      This means that you can create the hash and work with one environment at first (creating variables and such) and then switch to another environment, releasing the variables in other environment, this could cause problems with the allocator... (this happens specially when you use multiple threads, with an
      environment for every thread)

      The solution I've found is to uniformize the interface, just set the environment at first and then use the same environment until destroying the hash (because the hash increses the ref count of the environment it is sure the environment stored exists)

      If you copy or create a new hash you will have to set the environment for the new hash...
      I looked through all the calls of the hash in the code and it works fine (I know it is a big patch, but I think is usefull)

      Please let me know if any changes need to be done on the issue

      Attachments

        1. hash_env_option1.patch
          12 kB
          Alex Mantaut
        2. hash_env_option2.patch
          83 kB
          Alex Mantaut

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: