You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@etch.apache.org by "Martin Veith (JIRA)" <ji...@apache.org> on 2013/12/03 08:46:35 UTC

[jira] [Assigned] (ETCH-275) ValueFactory SRuntimes Mutex not unlocked

     [ https://issues.apache.org/jira/browse/ETCH-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Veith reassigned ETCH-275:
---------------------------------

    Assignee: Martin Veith

> 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
>            Assignee: Martin Veith
>         Attachments: 0001-ETCH-275-Fixed-SRuntimes-Mutex-unlock-in-Code-genera.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> (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)