[PATCH] debuginfod: optimize regular expressions in groom()

2022-08-03 Thread Josef Čejka via Elfutils-devel
>From 2b377704f46081f2348dfc5650820ac9b5485758 Mon Sep 17 00:00:00 2001
From: Josef Cejka 
Date: Wed, 3 Aug 2022 13:33:21 +0200
Subject: [PATCH] debuginfod: optimize regular expressions in groom()

Check if applying of -I and -X during grooming is enabled
before the regular expressions are matched.

Signed-off-by: Josef Cejka 
---
 debuginfod/debuginfod.cxx | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 303ffe00..a089d0bd 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -3580,11 +3580,17 @@ void groom()
   int64_t fileid = sqlite3_column_int64 (files, 1);
   const char* filename = ((const char*) sqlite3_column_text (files, 2) ?: 
"");
   struct stat s;
-  bool reg_include = !regexec (&file_include_regex, filename, 0, 0, 0);
-  bool reg_exclude = !regexec (&file_exclude_regex, filename, 0, 0, 0);
+  bool regex_file_drop = 0;
+
+  if (regex_groom)
+{
+  bool reg_include = !regexec (&file_include_regex, filename, 0, 0, 0);
+  bool reg_exclude = !regexec (&file_exclude_regex, filename, 0, 0, 0);
+  regex_file_drop = reg_exclude && !reg_include;
+}
 
   rc = stat(filename, &s);
-  if ( (regex_groom && reg_exclude && !reg_include) ||  rc < 0 || (mtime 
!= (int64_t) s.st_mtime) )
+  if ( regex_file_drop ||  rc < 0 || (mtime != (int64_t) s.st_mtime) )
 {
   if (verbose > 2)
 obatched(clog) << "groom: stale file=" << filename << " mtime=" << 
mtime << endl;
-- 
2.35.3





Re: [PATCH] debuginfod: optimize regular expressions in groom()

2022-08-03 Thread Frank Ch. Eigler via Elfutils-devel
Hi -

> Subject: [PATCH] debuginfod: optimize regular expressions in groom()

Thanks, pushed.

- FChE



☠ Buildbot (GNU Toolchain): elfutils - failed update (failure) (master)

2022-08-03 Thread builder--- via Elfutils-devel
A new failure has been detected on builder elfutils-opensuseleap-x86_64 while 
building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/90/builds/21

Build state: failed update (failure)
Revision: (unknown)
Worker: bb3
Build Reason: (unknown)
Blamelist: Josef Cejka 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( failure )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/21/steps/2/logs/stdio

A new failure has been detected on builder elfutils-debian-testing-x86_64 while 
building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/145/builds/12

Build state: failed update (failure)
Revision: (unknown)
Worker: bb2
Build Reason: (unknown)
Blamelist: Josef Cejka 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( failure )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/145/builds/12/steps/2/logs/stdio



☺ Buildbot (GNU Toolchain): elfutils - build successful (master)

2022-08-03 Thread builder--- via Elfutils-devel
A restored build has been detected on builder elfutils-opensuseleap-x86_64 
while building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/90/builds/22

Build state: build successful
Revision: cc2b85c4536f415547981fc4cf176e3fae967acc
Worker: bb1
Build Reason: (unknown)
Blamelist: Josef Cejka 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/2/logs/stdio

- 3: autoreconf ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/3/logs/stdio

- 4: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/4/logs/stdio

- 5: get version ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/5/logs/stdio
- property changes: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/5/logs/property_changes

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/6/logs/stdio
- warnings (2): 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/6/logs/warnings__2_

- 7: make check ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/7/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/7/logs/test-suite_log

- 8: make distcheck ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/8/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/8/logs/test-suite_log
- warnings (5): 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/8/logs/warnings__5_

- 9: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/9/logs/stdio

- 10: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/10/logs/stdio

- 11: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/11/logs/stdio

- 12: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/12/logs/stdio

- 13: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/13/logs/stdio

- 14: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/14/logs/stdio

- 15: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/15/logs/stdio

- 16: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/16/logs/stdio

- 17: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/17/logs/stdio

- 18: make clean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/90/builds/22/steps/18/logs/stdio



Issue 49759 in oss-fuzz: elfutils:fuzz-libelf: Timeout in fuzz-libelf

2022-08-03 Thread ClusterFuzz-External via monorail via Elfutils-devel
Status: New
Owner: 
CC: elfut...@sourceware.org, da...@adalogics.com, evv...@gmail.com, 
izz...@google.com 
Labels: ClusterFuzz Reproducible Engine-libfuzzer OS-Linux Proj-elfutils 
Reported-2022-08-03
Type: Bug

New issue 49759 by ClusterFuzz-External: elfutils:fuzz-libelf: Timeout in 
fuzz-libelf
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49759

Detailed Report: https://oss-fuzz.com/testcase?key=4741251823435776

Project: elfutils
Fuzzing Engine: libFuzzer
Fuzz Target: fuzz-libelf
Job Type: libfuzzer_asan_i386_elfutils
Platform Id: linux

Crash Type: Timeout (exceeds 60 secs)
Crash Address: 
Crash State:
  fuzz-libelf
  
Sanitizer: address (ASAN)

Regressed: 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_i386_elfutils&range=202203290604:202203291200

Reproducer Testcase: https://oss-fuzz.com/download?testcase_id=4741251823435776

Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing for 
instructions to reproduce this bug locally.
When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any 
stable releases.
  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any other 
feedback, please file an issue at https://github.com/google/oss-fuzz/issues. 
Comments on individual Monorail issues are not monitored.

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.


[Bug tools/28725] eu-ar -x -N COUNT uses instance [COUNT+1] of name

2022-08-03 Thread panxh_ran at 163 dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28725

--- Comment #2 from panxiaohe  ---
Please pay attention on this issue.
When using instance [COUNT] of name, the instance of check is wrong in
do_oper_extract().
instance-- should be --instance.
 522   if (res != NULL && (instance < 0 || instance-- == 0)
 523   && !found[(char **) res->data - argv])
 524 found[(char **) res->data - argv] = do_extract = true;
 525 }

-- 
You are receiving this mail because:
You are on the CC list for the bug.