Skip to content

Commit 61c4644

Browse files
committed
re2: revert "churn to new Abseil"
The new Abseil is not available in vcpkg, so it fails RE2 CI. Roll back to the older version for now. This reverts commit 7df5539.
1 parent cd7b282 commit 61c4644

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ set(ABSL_DEPS
8787
# indirectly), let that take precedence over any copy of Abseil that might have
8888
# been installed on the system. And likewise for ICU, GoogleTest and Benchmark.
8989
if(NOT TARGET absl::base)
90-
find_package(absl 20250814 REQUIRED)
90+
find_package(absl REQUIRED)
9191
endif()
9292
list(APPEND REQUIRES ${ABSL_DEPS})
9393

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ module(
1212

1313
bazel_dep(name = "platforms", version = "1.0.0")
1414
bazel_dep(name = "apple_support", version = "1.22.1")
15-
bazel_dep(name = "rules_cc", version = "0.2.0")
16-
bazel_dep(name = "abseil-cpp", version = "20250814.1")
15+
bazel_dep(name = "rules_cc", version = "0.1.4")
16+
bazel_dep(name = "abseil-cpp", version = "20250512.1")
1717
bazel_dep(name = "rules_python", version = "1.5.1")
1818
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
1919

re2/dfa.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ void DFA::RunWorkqOnByte(Workq* oldq, Workq* newq,
10151015
DFA::State* DFA::RunStateOnByteUnlocked(State* state, int c) {
10161016
// Keep only one RunStateOnByte going
10171017
// even if the DFA is being run by multiple threads.
1018-
absl::MutexLock l(mutex_);
1018+
absl::MutexLock l(&mutex_);
10191019
return RunStateOnByte(state, c);
10201020
}
10211021

@@ -1267,7 +1267,7 @@ DFA::StateSaver::~StateSaver() {
12671267
DFA::State* DFA::StateSaver::Restore() {
12681268
if (is_special_)
12691269
return special_;
1270-
absl::MutexLock l(dfa_->mutex_);
1270+
absl::MutexLock l(&dfa_->mutex_);
12711271
State* s = dfa_->CachedState(inst_, ninst_, flag_);
12721272
if (s == NULL)
12731273
ABSL_LOG(DFATAL) << "StateSaver failed to restore state.";
@@ -1730,7 +1730,7 @@ bool DFA::AnalyzeSearchHelper(SearchParams* params, StartInfo* info,
17301730
if (start != NULL)
17311731
return true;
17321732

1733-
absl::MutexLock l(mutex_);
1733+
absl::MutexLock l(&mutex_);
17341734
start = info->start.load(std::memory_order_relaxed);
17351735
if (start != NULL)
17361736
return true;
@@ -2050,7 +2050,7 @@ bool DFA::PossibleMatchRange(std::string* min, std::string* max, int maxlen) {
20502050
// Build minimum prefix.
20512051
State* s = params.start;
20522052
min->clear();
2053-
absl::MutexLock lock(mutex_);
2053+
absl::MutexLock lock(&mutex_);
20542054
for (int i = 0; i < maxlen; i++) {
20552055
if (previously_visited_states[s] > kMaxEltRepetitions)
20562056
break;

re2/regexp.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int Regexp::Ref() {
9595
if (ref_ < kMaxRef)
9696
return ref_;
9797

98-
absl::MutexLock l(*ref_mutex());
98+
absl::MutexLock l(ref_mutex());
9999
return (*ref_map())[this];
100100
}
101101

@@ -108,7 +108,7 @@ Regexp* Regexp::Incref() {
108108
});
109109

110110
// Store ref count in overflow map.
111-
absl::MutexLock l(*ref_mutex());
111+
absl::MutexLock l(ref_mutex());
112112
if (ref_ == kMaxRef) {
113113
// already overflowed
114114
(*ref_map())[this]++;
@@ -128,7 +128,7 @@ Regexp* Regexp::Incref() {
128128
void Regexp::Decref() {
129129
if (ref_ == kMaxRef) {
130130
// Ref count is stored in overflow map.
131-
absl::MutexLock l(*ref_mutex());
131+
absl::MutexLock l(ref_mutex());
132132
int r = (*ref_map())[this] - 1;
133133
if (r < kMaxRef) {
134134
ref_ = static_cast<uint16_t>(r);

re2/testing/regexp_benchmark.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ void SearchRE2(benchmark::State& state, const char* regexp,
964964

965965
Prog* GetCachedProg(const char* regexp) {
966966
static auto& mutex = *new absl::Mutex;
967-
absl::MutexLock lock(mutex);
967+
absl::MutexLock lock(&mutex);
968968
static auto& cache = *new absl::flat_hash_map<std::string, Prog*>;
969969
Prog* prog = cache[regexp];
970970
if (prog == NULL) {
@@ -982,7 +982,7 @@ Prog* GetCachedProg(const char* regexp) {
982982

983983
PCRE* GetCachedPCRE(const char* regexp) {
984984
static auto& mutex = *new absl::Mutex;
985-
absl::MutexLock lock(mutex);
985+
absl::MutexLock lock(&mutex);
986986
static auto& cache = *new absl::flat_hash_map<std::string, PCRE*>;
987987
PCRE* re = cache[regexp];
988988
if (re == NULL) {
@@ -995,7 +995,7 @@ PCRE* GetCachedPCRE(const char* regexp) {
995995

996996
RE2* GetCachedRE2(const char* regexp) {
997997
static auto& mutex = *new absl::Mutex;
998-
absl::MutexLock lock(mutex);
998+
absl::MutexLock lock(&mutex);
999999
static auto& cache = *new absl::flat_hash_map<std::string, RE2*>;
10001000
RE2* re = cache[regexp];
10011001
if (re == NULL) {

0 commit comments

Comments
 (0)