etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Frueh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ETCH-275) ValueFactory SRuntimes Mutex not unlocked
Date Thu, 28 Nov 2013 14:44:37 GMT

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

Aaron Frueh updated ETCH-275:
-----------------------------

    Attachment: 0001-ETCH-275-Fixed-SRuntimes-Mutex-unlock-in-Code-genera.patch

Please look at the following patch!

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

Mime
View raw message