Migration from QUIC_BUG to QUIC_BUG_V2(bug_id).
Per go/gfe-bug-improvements GFE_BUGs are getting stable IDs to allow for monitoring and alerting. Existing QUIC_BUG instances are changed to have quic_bug_n_m ID, where n is unique for each file, and m is a counter within each file, so we get QUIC_BUG_V2(quic_bug_123_2)
PiperOrigin-RevId: 362110458
Change-Id: I215ca9698f7d1d0a7d882c5bffff0a194b493cb5
diff --git a/quic/core/crypto/crypto_utils.cc b/quic/core/crypto/crypto_utils.cc
index ffa1f57..b6b78fc 100644
--- a/quic/core/crypto/crypto_utils.cc
+++ b/quic/core/crypto/crypto_utils.cc
@@ -280,8 +280,9 @@
crypters->decrypter = std::make_unique<NullDecrypter>(perspective);
return;
}
- QUIC_BUG_IF(!QuicUtils::IsConnectionIdValidForVersion(
- connection_id, version.transport_version))
+ QUIC_BUG_IF_V2(quic_bug_12871_1,
+ !QuicUtils::IsConnectionIdValidForVersion(
+ connection_id, version.transport_version))
<< "CreateTlsInitialCrypters: attempted to use connection ID "
<< connection_id << " which is invalid with version " << version;
const EVP_MD* hash = EVP_sha256();
@@ -295,7 +296,7 @@
HKDF_extract(handshake_secret.data(), &handshake_secret_len, hash,
reinterpret_cast<const uint8_t*>(connection_id.data()),
connection_id.length(), salt, salt_len);
- QUIC_BUG_IF(!hkdf_extract_success)
+ QUIC_BUG_IF_V2(quic_bug_12871_2, !hkdf_extract_success)
<< "HKDF_extract failed when creating initial crypters";
handshake_secret.resize(handshake_secret_len);
@@ -742,7 +743,8 @@
RETURN_STRING_LITERAL(ssl_early_data_quic_parameter_mismatch);
}
#endif
- QUIC_BUG_IF(reason < 0 || reason > ssl_early_data_reason_max_value)
+ QUIC_BUG_IF_V2(quic_bug_12871_3,
+ reason < 0 || reason > ssl_early_data_reason_max_value)
<< "Unknown ssl_early_data_reason_t " << reason;
return "unknown ssl_early_data_reason_t";
}
diff --git a/quic/core/crypto/curve25519_key_exchange.cc b/quic/core/crypto/curve25519_key_exchange.cc
index aefbcf5..b4d2ac9 100644
--- a/quic/core/crypto/curve25519_key_exchange.cc
+++ b/quic/core/crypto/curve25519_key_exchange.cc
@@ -25,7 +25,7 @@
QuicRandom* rand) {
std::unique_ptr<Curve25519KeyExchange> result =
New(Curve25519KeyExchange::NewPrivateKey(rand));
- QUIC_BUG_IF(result == nullptr);
+ QUIC_BUG_IF_V2(quic_bug_12891_1, result == nullptr);
return result;
}
diff --git a/quic/core/crypto/quic_crypto_client_config.cc b/quic/core/crypto/quic_crypto_client_config.cc
index 45db92b..24acba2 100644
--- a/quic/core/crypto/quic_crypto_client_config.cc
+++ b/quic/core/crypto/quic_crypto_client_config.cc
@@ -365,7 +365,7 @@
std::string QuicCryptoClientConfig::CachedState::GetNextServerNonce() {
if (server_nonces_.empty()) {
- QUIC_BUG
+ QUIC_BUG_V2(quic_bug_12943_1)
<< "Attempting to consume a server nonce that was never designated.";
return "";
}
@@ -495,8 +495,9 @@
CryptoHandshakeMessage* out,
std::string* error_details) const {
QUICHE_DCHECK(error_details != nullptr);
- QUIC_BUG_IF(!QuicUtils::IsConnectionIdValidForVersion(
- connection_id, preferred_version.transport_version))
+ QUIC_BUG_IF_V2(quic_bug_12943_2,
+ !QuicUtils::IsConnectionIdValidForVersion(
+ connection_id, preferred_version.transport_version))
<< "FillClientHello: attempted to use connection ID " << connection_id
<< " which is invalid with version " << preferred_version;
diff --git a/quic/core/crypto/quic_crypto_server_config.cc b/quic/core/crypto/quic_crypto_server_config.cc
index beecf3e..7ee5c59 100644
--- a/quic/core/crypto/quic_crypto_server_config.cc
+++ b/quic/core/crypto/quic_crypto_server_config.cc
@@ -140,7 +140,7 @@
delete;
~ValidateClientHelloHelper() {
- QUIC_BUG_IF(done_cb_ != nullptr)
+ QUIC_BUG_IF_V2(quic_bug_12963_1, done_cb_ != nullptr)
<< "Deleting ValidateClientHelloHelper with a pending callback.";
}
@@ -738,8 +738,9 @@
std::unique_ptr<ProofSource::Details> proof_source_details,
std::unique_ptr<ProcessClientHelloContext> context,
const Configs& configs) const {
- QUIC_BUG_IF(!QuicUtils::IsConnectionIdValidForVersion(
- context->connection_id(), context->transport_version()))
+ QUIC_BUG_IF_V2(quic_bug_12963_2,
+ !QuicUtils::IsConnectionIdValidForVersion(
+ context->connection_id(), context->transport_version()))
<< "ProcessClientHelloAfterGetProof: attempted to use connection ID "
<< context->connection_id() << " which is invalid with version "
<< context->version();
@@ -841,8 +842,9 @@
absl::string_view public_value,
std::unique_ptr<ProcessClientHelloContext> context,
const Configs& configs) const {
- QUIC_BUG_IF(!QuicUtils::IsConnectionIdValidForVersion(
- context->connection_id(), context->transport_version()))
+ QUIC_BUG_IF_V2(quic_bug_12963_3,
+ !QuicUtils::IsConnectionIdValidForVersion(
+ context->connection_id(), context->transport_version()))
<< "ProcessClientHelloAfterCalculateSharedKeys:"
" attempted to use connection ID "
<< context->connection_id() << " which is invalid with version "