Bug 669437 - receiver.fetch() segmentation fault when receiver is invalid
Summary: receiver.fetch() segmentation fault when receiver is invalid
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-13 16:57 UTC by Isaac Betesh
Modified: 2011-08-12 16:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-13 17:15:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Isaac Betesh 2011-01-13 16:57:13 UTC
Description of problem:
Calling fetch on an invalid receiver causes a segmentation fault.

How reproducible:
Occurs 100% of the time.

Steps to Reproduce:
1. qpid::messaging::Receiver r;
2. bool valid = r.isValid(); // valid will be false.
3. qpid::messaging::Message m;
4. bool found = r.fetch(m, qpid::messaging::Duration::IMMEDIATE);

Actual results:
Segmentation fault in qpid/messaging/Receiver.cpp on line 38

Expected results:
Throw an exception

Comment 1 Gordon Sim 2011-01-13 17:15:24 UTC
Not a bug; this is intended behaviour for the Receiver handle which is in effect a smart pointer. That is why the isValid() methid is there.


Note You need to log in before you can comment on or make changes to this bug.