You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Venkatesan (JIRA)" <ji...@apache.org> on 2015/10/29 07:13:27 UTC

[jira] [Comment Edited] (QPID-6811) Client API throws exception from destructors causing applications to terminate

    [ https://issues.apache.org/jira/browse/QPID-6811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14979895#comment-14979895 ] 

Venkatesan edited comment on QPID-6811 at 10/29/15 6:13 AM:
------------------------------------------------------------

Attaching patch, am new to qpid development process, not sure how to go about it - any inputs on how to take this patch forward appreciated.
Tested on Linux and Windows


was (Author: svtesan):
Attaching patch, am an new to qpid development process, not sure how to go about it - any inputs on how to take this patch forward appreciated.
Tested on Linux and Windows

> Client API throws exception from destructors causing applications to terminate
> ------------------------------------------------------------------------------
>
>                 Key: QPID-6811
>                 URL: https://issues.apache.org/jira/browse/QPID-6811
>             Project: Qpid
>          Issue Type: Bug
>    Affects Versions: 0.32
>         Environment: All
>            Reporter: Venkatesan
>         Attachments: qpid_dtor_crash.patch
>
>
> Client API has couple of classes like ScopedUnlock which do "reverse" RAII - unlock in ctor and lock in dtor. When locking fails in the destructor, it is not handled and an exception is thrown. This causes application to crash when the exception is thrown while stack is being unwound. 
> Scoped unlock does not seem the correct approach. Instead of freeing a resource in the destructor whose failure is not catastrophic, ScopedUnlock tries to acquire a resource on exit which can fail and there is no way this can be communicated back to the code!
> This class should be done away with and an explicit resource acquisition with proper failure handling semantics should be used. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org