Uploaded image for project: 'Etch'
  1. Etch
  2. ETCH-275

ValueFactory SRuntimes Mutex not unlocked

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • binding-cpp
    • None
    • All

    Description

      (Code Generation)
      The Static SRuntimes Mutex is not unlocked on every Error-Case and resolves to deadlocks.

      See following example:

      status_t ValueFactoryRemoting::InitValueFactory(EtchRuntime* runtime)
      {
      status_t status;
      SRuntimesMutex.lock();
      if (SRuntimes.find(runtime->getId()) != SRuntimes.end())

      { //runtime is already in list return ETCH_OK; <=== Missing unlock }

      status = SRuntimes.push_back(runtime->getId());
      runtime->registerListener(&SRemotingRuntimeListener);
      if (status != ETCH_OK)

      { return status; // <=== Missing unlock }

      if (SRuntimes.size() > 1)

      { //Valuefactory is already initialized SRuntimesMutex.unlock(); return ETCH_OK; }

      SRuntimesMutex.unlock();

      Attachments

        Activity

          People

            martin.veith Martin Veith
            afrueh Aaron Frueh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified