bugfindutils - Bugs: bug #63605, Large number of UBSAN failures in...

 
 

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

Submitter:  Sam James <thesamesam>
Submitted:  Sun 01 Jan 2023 03:43:35 AM UTC
Votes: 2
 
Category:  None Severity:  3 - Normal
Item Group:  Test suite failure Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  4.9.0 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 01 Jan 2023 03:43:35 AM UTC, original submission:  

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_main_impl ../csu/libc-start.c:381
    #7 0x55e8764cab54 in _start ../sysdeps/x86_64/start.S:115
[...]
```

I've attached the full build.log and find.sum. Let me know if more information is needed. Testing was done with GCC 12.2.1_p20221231.

I noticed some of these issues (or similar ones) were reported before at https://lists.endsoftwarepatents.org/archive/html/bug-findutils/2021-06/msg00005.html.

Sam James <thesamesam>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54171:  build.log added by thesamesam (585KiB - application/octet-stream)
file #54172:  find.sum added by thesamesam (351KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by egallager (Voted in favor of this item)
  • -email is unavailable- added by thesamesam (Submitted the item)
  •  

    There are 2 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-29 egallager Carbon-Copy- Added egallager
    2023-01-01 thesamesam Attached File- Added build.log, #54171
        Attached File- Added find.sum, #54172

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code