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

duplicate free: axis2_repos_listener and axis2_dep_engine when module load failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.7.0
    • None
    • None

    Description

      When the loading of a module failes (a dll not found, axis2.xml not correct, etc) the engine and configuration are directly freed.
      This results in duplicate free.
      Ususally, this is not really a problem, as all ptrs in the structs that are freed twice are NULL, resulting in no additional problems.
      Still, with MSVC and _CRTDBG_MAP_ALLOC, this leads to crashes.

      Stack trace summary:
      1) failed dep_engine_load_client calls repos_listener_free
      2) failed dep_engine_load_client calls conf_free which calls dep_engine_free
      3) which calls repos_listener_free (again)
      4) failed axis2_build_client_conf_ctx calls dep_engine_free (again).

      Problem seems to be that the ownership is not agreed on between conf->dep_engine and dep_engine->conf.

      complete stack traces:
      > axis2_engine.dll!axis2_repos_listener_free(axis2_repos_listener * repos_listener=0x03141920, const axutil_env * env=0x0312f3e0) Line 149 C
      axis2_engine.dll!axis2_dep_engine_load_client(axis2_dep_engine * dep_engine=0x03130510, const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 964 C
      axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env * env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 222 + 0x8 bytes C
      axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144, axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 + 0x1b bytes C
      axis2_engine.dll!axis2_svc_client_create(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
      axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418, const char * client_home=0x0312e144) Line 66 + 0xb bytes C

      > axis2_engine.dll!axis2_dep_engine_free(axis2_dep_engine * dep_engine=0x03130510, const axutil_env * env=0x0312f3e0) Line 386 C
      axis2_engine.dll!axis2_conf_free(axis2_conf * conf=0x00000000, const axutil_env * env=0x0312f3e0) Line 357 C
      axis2_engine.dll!axis2_dep_engine_load_client(axis2_dep_engine * dep_engine=0x03130510, const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 965 C
      axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env * env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 222 + 0x8 bytes C
      axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144, axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 + 0x1b bytes C
      axis2_engine.dll!axis2_svc_client_create(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
      axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418, const char * client_home=0x0312e144) Line 66 + 0xb bytes C

      > axis2_engine.dll!axis2_repos_listener_free(axis2_repos_listener * repos_listener=0x03141920, const axutil_env * env=0x0312f3e0) Line 149 C
      axis2_engine.dll!axis2_dep_engine_free(axis2_dep_engine * dep_engine=0x03130510, const axutil_env * env=0x0312f3e0) Line 570 C
      axis2_engine.dll!axis2_conf_free(axis2_conf * conf=0x00000000, const axutil_env * env=0x0312f3e0) Line 357 C
      axis2_engine.dll!axis2_dep_engine_load_client(axis2_dep_engine * dep_engine=0x03130510, const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 965 C
      axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env * env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 222 + 0x8 bytes C
      axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144, axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 + 0x1b bytes C
      axis2_engine.dll!axis2_svc_client_create(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
      axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418, const char * client_home=0x0312e144) Line 66 + 0xb bytes C

      > axis2_engine.dll!axis2_dep_engine_free(axis2_dep_engine * dep_engine=0x03130510, const axutil_env * env=0x0312f3e0) Line 386 C
      axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env * env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 228 + 0x7 bytes C
      axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144, axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 + 0x1b bytes C
      axis2_engine.dll!axis2_svc_client_create(const axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
      axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418, const char * client_home=0x0312e144) Line 66 + 0xb bytes C

      Attachments

        Activity

          People

            Unassigned Unassigned
            csb-ac Sebastian Brandt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: