Aaron Frueh created ETCH-275:
--------------------------------

             Summary: ValueFactory SRuntimes Mutex not unlocked
                 Key: ETCH-275
                 URL: https://issues.apache.org/jira/browse/ETCH-275
             Project: Etch
          Issue Type: Bug
          Components: binding-cpp
    Affects Versions: 1.3.0
         Environment: All
            Reporter: Aaron Frueh


(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();



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to