Bug 669437

Summary: receiver.fetch() segmentation fault when receiver is invalid
Product: Red Hat Enterprise MRG Reporter: Isaac Betesh <isaac.betesh>
Component: qpid-cppAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED NOTABUG QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 1.3CC: gsim
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 17:15:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.