Re: [bug #63605] Large number of UBSAN failures in test suite

2024-05-19 Thread Sam James
James Youngman  writes:

> Fixed with the attached patch.
>

Thank you!



[bug #64253] Suggestion - Add support for libmagic and xattr

2023-05-27 Thread Sam James
Follow-up Comment #4, bug #64253 (project findutils):

Speaking for a distro which tends to expose a lot of this choice to users
(Gentoo), it should be fine as long as there's explicit configure args for
each.

Lots of other packages do stuff like this too. It's only really a problem if
it's "automagic" (use-if-installed, no option to control it) or mandatory.
Truly optional stuff with --with-x or --enable-x is fine (or
--without/--disable, you get  the idea).

Also, thanks! This sounds great.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #63934] tests/xargs/verbose-quote.sh fails with dash shell as /bin/sh

2023-03-16 Thread Sam James
URL:
  <https://savannah.gnu.org/bugs/?63934>

 Summary: tests/xargs/verbose-quote.sh fails with dash shell
as /bin/sh
   Group: findutils
   Submitter: thesamesam
   Submitted: Thu 16 Mar 2023 06:46:57 PM UTC
Category: None
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Originator Name: 
Originator Email: 
 Open/Closed: Open
 Release: None
 Discussion Lock: Any
   Fixed Release: None


___

Follow-up Comments:


---
Date: Thu 16 Mar 2023 06:46:57 PM UTC By: Sam James 
find --version:
```
find (GNU findutils) 4.9.0
Packaged by Gentoo (4.9.0-r2)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD)
CBO(level=2)
```

When running `make check` on findutils-4.9.0, I get one test failure:
```
FAIL: tests/xargs/verbose-quote.sh
```

Upon further inspection of the test logs in /tests/xargs/verbose-quote.log, I
see:
```
--- experr  2023-03-16 18:46:16.428328371 +
+++ err 2023-03-16 18:46:16.418328323 +
@@ -2,4 +2,4 @@
 './my command' 'hel lo' '10 0' world
 './my command' 'hel lo' '20"0' world
 './my command' 'hel lo' "30'0" world
-'./my command' 'hel lo' '40'$'\n''0' world
+'./my command' 'hel lo' '40$\n0' world
--- expout  2023-03-16 18:46:16.438328420 +
+++ out 2023-03-16 18:46:16.421661673 +
@@ -2,5 +2,5 @@
 hel lo 10 0 world
 hel lo 20"0 world
 hel lo 30'0 world
-hel lo 40
+hel lo 40$
1. world
FAIL tests/xargs/verbose-quote.sh (exit status: 1)
```

This test passes when /bin/sh = bash, and fails when /bin/sh = dash.








___

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63934>

___
Message sent via Savannah
https://savannah.gnu.org/




Re: Report 2 UBSan bugs found by an automatic tool

2023-01-05 Thread Sam James
(Replying to https://www.mail-archive.com/bug-findutils@gnu.org/msg06369.html)

Given that the CBO is responsible for so many failures both in the test suite
and at runtime with UBSAN, would it be possible to go ahead and drop it?

(See https://savannah.gnu.org/bugs/?63605).

Best,
sam


signature.asc
Description: Message signed with OpenPGP


[bug #63605] Large number of UBSAN failures in test suite

2022-12-31 Thread Sam James
URL:
  <https://savannah.gnu.org/bugs/?63605>

 Summary: Large number of UBSAN failures in test suite
 Project: findutils
   Submitter: thesamesam
   Submitted: Sun 01 Jan 2023 03:43:35 AM UTC
Category: None
Severity: 3 - Normal
  Item Group: Test suite failure
  Status: None
 Privacy: Public
 Assigned to: None
 Originator Name: 
Originator Email: 
 Open/Closed: Open
 Release: 4.9.0
 Discussion Lock: Any
   Fixed Release: None


___

Follow-up Comments:


---
Date: Sun 01 Jan 2023 03:43:35 AM UTC By: Sam James 
Hi,

I've been running Undefined Behaviour Sanitizer (UBSAN, -fsanitize=undefined)
on test suites for a bunch of core applications including findutils.

When building w/ ./configure CFLAGS="-O2 -ggdb3 -fsanitize=undefined"
LDFLAGS="-O2 -ggdb3 -fsanitize=undefined" & running make check, I get a very
large number of failures:
```
[...]
Running
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/testsuite/find.gnu/gnuand.exp
...
FAIL: gnuand.new-O0, tree.c:552:6: runtime error: member access within null
pointer of type 'struct predicate'
#0 0x5599c6727e26 in consider_arm_swap
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:552
#1 0x5599c6727e26 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:643
#2 0x5599c67277a4 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:644
#3 0x5599c6728e25 in build_expression_tree
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:1431
#4 0x5599c67148f0 in main
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/ftsfind.c:789
#5 0x7fd5a90c064f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
#6 0x7fd5a90c0708 in __libc_start_main_impl ../csu/libc-start.c:381
#7 0x5599c6714b54 in _start ../sysdeps/x86_64/start.S:115

FAIL: gnuand.new-O1, tree.c:552:6: runtime error: member access within null
pointer of type 'struct predicate'
#0 0x5557507c1e26 in consider_arm_swap
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:552
#1 0x5557507c1e26 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:643
#2 0x5557507c17a4 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:644
#3 0x5557507c2e25 in build_expression_tree
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:1431
#4 0x5557507ae8f0 in main
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/ftsfind.c:789
#5 0x7f0c3209664f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
#6 0x7f0c32096708 in __libc_start_main_impl ../csu/libc-start.c:381
#7 0x5557507aeb54 in _start ../sysdeps/x86_64/start.S:115

FAIL: gnuand.new-O2, tree.c:552:6: runtime error: member access within null
pointer of type 'struct predicate'
#0 0x55c02e6e6e26 in consider_arm_swap
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:552
#1 0x55c02e6e6e26 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:643
#2 0x55c02e6e67a4 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:644
#3 0x55c02e6e7e25 in build_expression_tree
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:1431
#4 0x55c02e6d38f0 in main
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/ftsfind.c:789
#5 0x7f6c93ac364f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
#6 0x7f6c93ac3708 in __libc_start_main_impl ../csu/libc-start.c:381
#7 0x55c02e6d3b54 in _start ../sysdeps/x86_64/start.S:115

FAIL: gnuand.new-O3, tree.c:552:6: runtime error: member access within null
pointer of type 'struct predicate'
#0 0x55e8764dde26 in consider_arm_swap
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:552
#1 0x55e8764dde26 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:643
#2 0x55e8764dd7a4 in do_arm_swaps
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:644
#3 0x55e8764dee25 in build_expression_tree
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/tree.c:1431
#4 0x55e8764ca8f0 in main
/var/tmp/portage/sys-apps/findutils-4.9.0-r2/work/findutils-4.9.0/find/ftsfind.c:789
#5 0x7fc84820f64f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
#6 0x7fc84820f708 in __libc_start_mai