Bug 884322

Summary: crash due to unexpected exception on connection loss in libpqxx
Product: [Fedora] Fedora Reporter: Serge Pavlovsky <pal666>
Component: libpqxxAssignee: Andreas Bierfert <andreas.bierfert>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: andreas.bierfert, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-05 22:40:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
tested patch none

Description Serge Pavlovsky 2012-12-05 22:28:45 UTC
Created attachment 658426 [details]
tested patch

Description of problem:

pqxx::connection_base::encoding_code() is marked as non-throwing, but it calls activate(), which throws on connection loss, causing call of std::unexcpected() and subsequent crash
other similar functions, for example pqxx::connection_base::protocol_version(), just return 0 when not connected

please apply attached patch

Version-Release number of selected component (if applicable):
3.2-0.2

Comment 1 Serge Pavlovsky 2012-12-05 22:40:58 UTC
i got an error from cgi during posting, but turns out it was posted successfully

*** This bug has been marked as a duplicate of bug 884323 ***