Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package re2 for openSUSE:Factory checked in 
at 2021-02-11 12:46:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/re2 (Old)
 and      /work/SRC/openSUSE:Factory/.re2.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "re2"

Thu Feb 11 12:46:34 2021 rev:36 rq:869184 version:MACRO

Changes:
--------
--- /work/SRC/openSUSE:Factory/re2/re2.changes  2020-11-09 13:56:44.708051294 
+0100
+++ /work/SRC/openSUSE:Factory/.re2.new.28504/re2.changes       2021-02-11 
12:47:40.061513363 +0100
@@ -1,0 +2,6 @@
+Thu Feb  4 09:53:32 UTC 2021 - Callum Farmer <[email protected]>
+
+- Update to version 2021-02-02:
+  * Address `-Wnull-dereference' warnings from GCC 10.x.
+
+-------------------------------------------------------------------

Old:
----
  re2-2020-11-01.tar.gz

New:
----
  re2-2021-02-02.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ re2.spec ++++++
--- /var/tmp/diff_new_pack.1qJPZe/_old  2021-02-11 12:47:40.513514021 +0100
+++ /var/tmp/diff_new_pack.1qJPZe/_new  2021-02-11 12:47:40.517514027 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%global longver 2020-11-01
+%global longver 2021-02-02
 %global shortver %(echo %{longver}|sed 's|-||g')
 %define libname libre2-9
 Name:           re2

++++++ re2-2020-11-01.tar.gz -> re2-2021-02-02.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/CMakeLists.txt 
new/re2-2021-02-02/CMakeLists.txt
--- old/re2-2020-11-01/CMakeLists.txt   2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/CMakeLists.txt   2021-02-02 01:24:20.000000000 +0100
@@ -56,8 +56,6 @@
   list(APPEND EXTRA_TARGET_LINK_LIBRARIES pcre)
 endif()
 
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
 set(RE2_SOURCES
     re2/bitstate.cc
     re2/compile.cc
@@ -84,6 +82,7 @@
     )
 
 add_library(re2 ${RE2_SOURCES})
+target_include_directories (re2 PUBLIC 
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
 add_library(re2::re2 ALIAS re2)
 
 if(RE2_BUILD_TESTING)
@@ -99,6 +98,7 @@
       )
 
   add_library(testing STATIC ${TESTING_SOURCES})
+  target_link_libraries(testing PUBLIC re2)
 
   set(TEST_TARGETS
       charclass_test
@@ -130,13 +130,13 @@
 
   foreach(target ${TEST_TARGETS})
     add_executable(${target} re2/testing/${target}.cc util/test.cc)
-    target_link_libraries(${target} testing re2 ${EXTRA_TARGET_LINK_LIBRARIES})
+    target_link_libraries(${target} testing ${EXTRA_TARGET_LINK_LIBRARIES})
     add_test(NAME ${target} COMMAND ${target})
   endforeach(target)
 
   foreach(target ${BENCHMARK_TARGETS})
     add_executable(${target} re2/testing/${target}.cc util/benchmark.cc)
-    target_link_libraries(${target} testing re2 ${EXTRA_TARGET_LINK_LIBRARIES})
+    target_link_libraries(${target} testing ${EXTRA_TARGET_LINK_LIBRARIES})
   endforeach(target)
 endif()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/doc/mksyntaxgo 
new/re2-2021-02-02/doc/mksyntaxgo
--- old/re2-2020-11-01/doc/mksyntaxgo   2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/doc/mksyntaxgo   2021-02-02 01:24:20.000000000 +0100
@@ -15,7 +15,7 @@
 ,s/\n\n\n+/\n\n/g
 ,x/(^.*        .*\n)+/ | awk -F'       ' '{printf("  %-14s %s\n", $1, $2)}'
 1,2c
-// Copyright 2012 The Go Authors.  All rights reserved.
+// Copyright 2012 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
@@ -33,6 +33,7 @@
 
 .
 $a
+Unicode character classes are those in unicode.Categories and unicode.Scripts.
 */
 package syntax
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/re2/nfa.cc 
new/re2-2021-02-02/re2/nfa.cc
--- old/re2-2020-11-01/re2/nfa.cc       2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/re2/nfa.cc       2021-02-02 01:24:20.000000000 +0100
@@ -600,7 +600,7 @@
     // by simply not continuing the loop.
     // This complements the special case in NFA::Step().
     if (p == NULL) {
-      (void)Step(runq, nextq, p < etext_ ? p[0] & 0xFF : -1, context, p);
+      (void) Step(runq, nextq, -1, context, p);
       DCHECK_EQ(runq->size(), 0);
       using std::swap;
       swap(nextq, runq);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/re2/re2.h new/re2-2021-02-02/re2/re2.h
--- old/re2-2020-11-01/re2/re2.h        2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/re2/re2.h        2021-02-02 01:24:20.000000000 +0100
@@ -830,8 +830,9 @@
 #if !defined(_MSC_VER)
   template <typename T>
   using CanParseFrom = typename std::enable_if<
-      std::is_member_function_pointer<decltype(
-          (bool (T::*)(const char*, size_t))&T::ParseFrom)>::value,
+      std::is_member_function_pointer<
+          decltype(static_cast<bool (T::*)(const char*, size_t)>(
+              &T::ParseFrom))>::value,
       int>::type;
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/re2/regexp.cc 
new/re2-2021-02-02/re2/regexp.cc
--- old/re2-2020-11-01/re2/regexp.cc    2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/re2/regexp.cc    2021-02-02 01:24:20.000000000 +0100
@@ -722,8 +722,14 @@
   *foldcase = false;
 
   // No need for a walker: the regexp must either begin with or be
-  // a literal char or string.
+  // a literal char or string. We "see through" capturing groups,
+  // but make no effort to glue multiple prefix fragments together.
   Regexp* re = op_ == kRegexpConcat && nsub_ > 0 ? sub()[0] : this;
+  while (re->op_ == kRegexpCapture) {
+    re = re->sub()[0];
+    if (re->op_ == kRegexpConcat && re->nsub_ > 0)
+      re = re->sub()[0];
+  }
   if (re->op_ != kRegexpLiteral &&
       re->op_ != kRegexpLiteralString)
     return false;
@@ -913,7 +919,7 @@
 // The ranges are allocated in the same block as the header,
 // necessitating a special allocator and Delete method.
 
-CharClass* CharClass::New(int maxranges) {
+CharClass* CharClass::New(size_t maxranges) {
   CharClass* cc;
   uint8_t* data = new uint8_t[sizeof *cc + maxranges*sizeof cc->ranges_[0]];
   cc = reinterpret_cast<CharClass*>(data);
@@ -930,7 +936,7 @@
 }
 
 CharClass* CharClass::Negate() {
-  CharClass* cc = CharClass::New(nranges_+1);
+  CharClass* cc = CharClass::New(static_cast<size_t>(nranges_+1));
   cc->folds_ascii_ = folds_ascii_;
   cc->nrunes_ = Runemax + 1 - nrunes_;
   int n = 0;
@@ -967,7 +973,7 @@
 }
 
 CharClass* CharClassBuilder::GetCharClass() {
-  CharClass* cc = CharClass::New(static_cast<int>(ranges_.size()));
+  CharClass* cc = CharClass::New(ranges_.size());
   int n = 0;
   for (iterator it = begin(); it != end(); ++it)
     cc->ranges_[n++] = *it;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/re2/regexp.h 
new/re2-2021-02-02/re2/regexp.h
--- old/re2-2020-11-01/re2/regexp.h     2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/re2/regexp.h     2021-02-02 01:24:20.000000000 +0100
@@ -86,6 +86,7 @@
 // form accessible to clients, so that client code can analyze the
 // parsed regular expressions.
 
+#include <stddef.h>
 #include <stdint.h>
 #include <map>
 #include <set>
@@ -259,7 +260,7 @@
  private:
   CharClass();  // not implemented
   ~CharClass();  // not implemented
-  static CharClass* New(int maxranges);
+  static CharClass* New(size_t maxranges);
 
   friend class CharClassBuilder;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/re2/testing/regexp_benchmark.cc 
new/re2-2021-02-02/re2/testing/regexp_benchmark.cc
--- old/re2-2020-11-01/re2/testing/regexp_benchmark.cc  2020-10-26 
11:17:05.000000000 +0100
+++ new/re2-2021-02-02/re2/testing/regexp_benchmark.cc  2021-02-02 
01:24:20.000000000 +0100
@@ -152,24 +152,29 @@
 
 // Generate random text that won't contain the search string,
 // to test worst-case search behavior.
-void MakeText(std::string* text, int64_t nbytes) {
-  srand(1);
-  text->resize(nbytes);
-  for (int64_t i = 0; i < nbytes; i++) {
-    // Generate a one-byte rune that isn't a control character (e.g. '\n').
-    // Clipping to 0x20 introduces some bias, but we don't need uniformity.
-    int byte = rand() & 0x7F;
-    if (byte < 0x20)
-      byte = 0x20;
-    (*text)[i] = byte;
-  }
+std::string RandomText(int64_t nbytes) {
+  static const std::string* const text = []() {
+    std::string* text = new std::string;
+    srand(1);
+    text->resize(16<<20);
+    for (int64_t i = 0; i < 16<<20; i++) {
+      // Generate a one-byte rune that isn't a control character (e.g. '\n').
+      // Clipping to 0x20 introduces some bias, but we don't need uniformity.
+      int byte = rand() & 0x7F;
+      if (byte < 0x20)
+        byte = 0x20;
+      (*text)[i] = byte;
+    }
+    return text;
+  }();
+  CHECK_LE(nbytes, 16<<20);
+  return text->substr(0, nbytes);
 }
 
 // Makes text of size nbytes, then calls run to search
 // the text for regexp iters times.
 void Search(benchmark::State& state, const char* regexp, SearchImpl* search) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   search(state, regexp, s, Prog::kUnanchored, false);
   state.SetBytesProcessed(state.iterations() * state.range(0));
 }
@@ -273,8 +278,7 @@
   std::string s;
   s.append(state.range(0)/2, 'x');
   std::string regexp = "^" + s + ".*$";
-  std::string t;
-  MakeText(&t, state.range(0)/2);
+  std::string t = RandomText(state.range(0)/2);
   s += t;
   search(state, regexp.c_str(), s, Prog::kUnanchored, true);
   state.SetBytesProcessed(state.iterations() * state.range(0));
@@ -295,8 +299,7 @@
 // Benchmark: FindAndConsume
 
 void FindAndConsume(benchmark::State& state) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   s.append("Hello World");
   RE2 re("((Hello World))");
   for (auto _ : state) {
@@ -314,8 +317,7 @@
 
 void SearchSuccess(benchmark::State& state, const char* regexp,
                    SearchImpl* search) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   search(state, regexp, s, Prog::kAnchored, true);
   state.SetBytesProcessed(state.iterations() * state.range(0));
 }
@@ -385,8 +387,7 @@
 // Note that OnePass doesn't implement it!
 
 void SearchAltMatch(benchmark::State& state, SearchImpl* search) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   search(state, "\\C*", s, Prog::kAnchored, true);
   state.SetBytesProcessed(state.iterations() * state.range(0));
 }
@@ -770,8 +771,7 @@
 // Makes text of size nbytes, then calls run to search
 // the text for regexp iters times.
 void SearchPhone(benchmark::State& state, ParseImpl* search) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   s.append("(650) 253-0001");
   search(state, "(\\d{3}-|\\(\\d{3}\\)\\s+)(\\d{3}-\\d{4})", s);
   state.SetBytesProcessed(state.iterations() * state.range(0));
@@ -1507,8 +1507,7 @@
 BENCHMARK(ASCIIMatchRE2)->ThreadRange(1, NumCPUs());
 
 void FullMatchPCRE(benchmark::State& state, const char *regexp) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   s += "ABCDEFGHIJ";
   PCRE re(regexp);
   for (auto _ : state) {
@@ -1518,8 +1517,7 @@
 }
 
 void FullMatchRE2(benchmark::State& state, const char *regexp) {
-  std::string s;
-  MakeText(&s, state.range(0));
+  std::string s = RandomText(state.range(0));
   s += "ABCDEFGHIJ";
   RE2 re(regexp, RE2::Latin1);
   for (auto _ : state) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/re2/testing/required_prefix_test.cc 
new/re2-2021-02-02/re2/testing/required_prefix_test.cc
--- old/re2-2020-11-01/re2/testing/required_prefix_test.cc      2020-10-26 
11:17:05.000000000 +0100
+++ new/re2-2021-02-02/re2/testing/required_prefix_test.cc      2021-02-02 
01:24:20.000000000 +0100
@@ -30,8 +30,8 @@
 
   // If the regexp immediately goes into
   // something not a literal match, there's no required prefix.
-  { "^(abc)", false },
   { "^a*",  false },
+  { "^(abc)", false },
 
   // Otherwise, it should work.
   { "^abc$", true, "abc", false, "(?-m:$)" },
@@ -84,17 +84,25 @@
 
   // If the regexp immediately goes into
   // something not a literal match, there's no required prefix.
-  { "(abc)", false },
   { "a*",  false },
 
+  // Unlike RequiredPrefix(), RequiredPrefixForAccel() can "see through"
+  // capturing groups, but doesn't try to glue prefix fragments together.
+  { "(a?)def", false },
+  { "(ab?)def", true, "a", false },
+  { "(abc?)def", true, "ab", false },
+  { "(()a)def", false },
+  { "((a)b)def", true, "a", false },
+  { "((ab)c)def", true, "ab", false },
+
   // Otherwise, it should work.
-  { "abc$", true, "abc", false, },
-  { "abc", true, "abc", false, },
-  { "(?i)abc", true, "abc", true, },
-  { "abcd*", true, "abc", false, },
-  { "[Aa][Bb]cd*", true, "ab", true, },
-  { "ab[Cc]d*", true, "ab", false, },
-  { "???abc", true, "???abc", false, },
+  { "abc$", true, "abc", false },
+  { "abc", true, "abc", false },
+  { "(?i)abc", true, "abc", true },
+  { "abcd*", true, "abc", false },
+  { "[Aa][Bb]cd*", true, "ab", true },
+  { "ab[Cc]d*", true, "ab", false },
+  { "???abc", true, "???abc", false },
 };
 
 TEST(RequiredPrefixForAccel, SimpleTests) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2020-11-01/util/mutex.h 
new/re2-2021-02-02/util/mutex.h
--- old/re2-2020-11-01/util/mutex.h     2020-10-26 11:17:05.000000000 +0100
+++ new/re2-2021-02-02/util/mutex.h     2021-02-02 01:24:20.000000000 +0100
@@ -12,6 +12,7 @@
 
 #ifdef _WIN32
 // Requires Windows Vista or Windows Server 2008 at minimum.
+#include <windows.h>
 #if defined(WINVER) && WINVER >= 0x0600
 #define MUTEX_IS_WIN32_SRWLOCK
 #endif
@@ -26,7 +27,6 @@
 #endif
 
 #if defined(MUTEX_IS_WIN32_SRWLOCK)
-#include <windows.h>
 typedef SRWLOCK MutexType;
 #elif defined(MUTEX_IS_PTHREAD_RWLOCK)
 #include <pthread.h>

Reply via email to