[Coverity 1403257] ssl_gtests may throw exceptions in destructors

RESOLVED FIXED in 3.31

Status

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

({coverity})

trunk
3.31
coverity

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

2 years ago
** CID 1403257:    (UNCAUGHT_EXCEPT)
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()


________________________________________________________________________________________________________
*** CID 1403257:    (UNCAUGHT_EXCEPT)
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
77       memset(&csinfo_, 0, sizeof(csinfo_));
78       SECStatus rv = SSL_VersionRangeGetDefault(
79           mode_ == STREAM ? ssl_variant_stream : ssl_variant_datagram, &vrange_);
80       EXPECT_EQ(SECSuccess, rv);
81     }
82
>>>     CID 1403257:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "testing::internal::GoogleTestFailureException" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
83     TlsAgent::~TlsAgent() {
84       if (timer_handle_) {
85         timer_handle_->Cancel();
86       }
87
88       if (adapter_) {
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
77       memset(&csinfo_, 0, sizeof(csinfo_));
78       SECStatus rv = SSL_VersionRangeGetDefault(
79           mode_ == STREAM ? ssl_variant_stream : ssl_variant_datagram, &vrange_);
80       EXPECT_EQ(SECSuccess, rv);
81     }
82
>>>     CID 1403257:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "testing::internal::GoogleTestFailureException" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
83     TlsAgent::~TlsAgent() {
84       if (timer_handle_) {
85         timer_handle_->Cancel();
86       }
87
88       if (adapter_) {
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
77       memset(&csinfo_, 0, sizeof(csinfo_));
78       SECStatus rv = SSL_VersionRangeGetDefault(
79           mode_ == STREAM ? ssl_variant_stream : ssl_variant_datagram, &vrange_);
80       EXPECT_EQ(SECSuccess, rv);
81     }
82
>>>     CID 1403257:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "testing::internal::GoogleTestFailureException" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
83     TlsAgent::~TlsAgent() {
84       if (timer_handle_) {
85         timer_handle_->Cancel();
86       }
87
88       if (adapter_) {
/gtests/ssl_gtest/tls_agent.cc: 83 in nss_test::TlsAgent::~TlsAgent()()
77       memset(&csinfo_, 0, sizeof(csinfo_));
78       SECStatus rv = SSL_VersionRangeGetDefault(
79           mode_ == STREAM ? ssl_variant_stream : ssl_variant_datagram, &vrange_);
80       EXPECT_EQ(SECSuccess, rv);
81     }
82
>>>     CID 1403257:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "testing::internal::GoogleTestFailureException" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
83     TlsAgent::~TlsAgent() {
84       if (timer_handle_) {
85         timer_handle_->Cancel();
86       }
87
88       if (adapter_) {
(Assignee)

Updated

2 years ago
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
(Assignee)

Comment 1

2 years ago
https://nss-review.dev.mozaws.net/D281

https://hg.mozilla.org/projects/nss/rev/215207b4864c
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.31
You need to log in before you can comment on or make changes to this bug.