GNU bug report logs -
#60457
Test failure (color) with UBSAN
Previous Next
Reported by: Sam James <sam <at> gentoo.org>
Date: Sat, 31 Dec 2022 21:55:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60457 in the body.
You can then email your comments to 60457 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-diffutils <at> gnu.org
:
bug#60457
; Package
diffutils
.
(Sat, 31 Dec 2022 21:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sam James <sam <at> gentoo.org>
:
New bug report received and forwarded. Copy sent to
bug-diffutils <at> gnu.org
.
(Sat, 31 Dec 2022 21:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi folks,
I'm testing out the latest release previews from platform-testers in Gentoo and came across the following.
diffutils' tests seem to fail (specifically the 'color' test) when built with UBSAN (-fsanitize=undefined):
```
[...]
+ mkfifo fifo
+ printf %1000000s-a
+ printf %1000000s-b
+ + diff --color=always ---presume-output-tty a bhead
-c 10
util.c:205:3: runtime error: execution reached an unreachable program point
#0 0x558fa0c7ee3c in xsigismember /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:205
#1 0x558fa0c7f4e5 in install_signal_handlers /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:372
#2 0x558fa0c80f05 in check_color_output /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:822
#3 0x558fa0c81976 in begin_output /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:1017
#4 0x558fa0c7c63d in print_normal_hunk /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/normal.c:49
#5 0x558fa0c82cd1 in print_script /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:1303
#6 0x558fa0c7c5e5 in print_normal_script /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/normal.c:31
#7 0x558fa0c640cc in diff_2_files /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/analyze.c:665
#8 0x558fa0c6f28c in compare_files /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/diff.c:1488
#9 0x558fa0c69e11 in main /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/diff.c:851
#10 0x7fb6ab79664f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#11 0x7fb6ab796708 in __libc_start_main_impl ../csu/libc-start.c:381
#12 0x558fa0c5a144 in _start ../sysdeps/x86_64/start.S:115
+ test 1 = 141
+ fail=1
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ test = yes
+ cd /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests
+ chmod -R u+rwx /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests/gt-colors.1cSV
+ rm -rf /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests/gt-colors.1cSV
+ exit 1
FAIL colors (exit status: 1)
============================================================================
Testsuite summary for GNU diffutils 3.8.43-2d50
============================================================================
# TOTAL: 23
# PASS: 21
# SKIP: 0
# XFAIL: 1
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to bug-diffutils <at> gnu.org
============================================================================
```
This is with GCC 12.2.1_p20221224.
I've made the full log available at https://dev.gentoo.org/~sam/bugs/diffutils/ubsan-color-test/build.log
and https://dev.gentoo.org/~sam/bugs/diffutils/ubsan-color-test/test-suite.log.
Let me know if more information is required.
Best,
sam
[signature.asc (application/pgp-signature, attachment)]
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Sun, 01 Jan 2023 05:03:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sam James <sam <at> gentoo.org>
:
bug acknowledged by developer.
(Sun, 01 Jan 2023 05:03:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 60457-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for reporting that. I installed the attached which should fix it.
[0001-maint-fix-assumption-typo.patch (text/x-patch, attachment)]
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#60457
; Package
diffutils
.
(Sun, 08 Jan 2023 02:02:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 60457 <at> debbugs.gnu.org (full text, mbox):
On Sat, Dec 31, 2022 at 1:55 PM Sam James <sam <at> gentoo.org> wrote:
> Hi folks,
>
> I'm testing out the latest release previews from platform-testers in Gentoo and came across the following.
>
> diffutils' tests seem to fail (specifically the 'color' test) when built with UBSAN (-fsanitize=undefined):
> ```
> [...]
> + mkfifo fifo
> + printf %1000000s-a
> + printf %1000000s-b
> + + diff --color=always ---presume-output-tty a bhead
> -c 10
> util.c:205:3: runtime error: execution reached an unreachable program point
> #0 0x558fa0c7ee3c in xsigismember /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:205
> #1 0x558fa0c7f4e5 in install_signal_handlers /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:372
> #2 0x558fa0c80f05 in check_color_output /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:822
> #3 0x558fa0c81976 in begin_output /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:1017
> #4 0x558fa0c7c63d in print_normal_hunk /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/normal.c:49
> #5 0x558fa0c82cd1 in print_script /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:1303
> #6 0x558fa0c7c5e5 in print_normal_script /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/normal.c:31
> #7 0x558fa0c640cc in diff_2_files /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/analyze.c:665
> #8 0x558fa0c6f28c in compare_files /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/diff.c:1488
> #9 0x558fa0c69e11 in main /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/diff.c:851
> #10 0x7fb6ab79664f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
> #11 0x7fb6ab796708 in __libc_start_main_impl ../csu/libc-start.c:381
> #12 0x558fa0c5a144 in _start ../sysdeps/x86_64/start.S:115
>
> + test 1 = 141
> + fail=1
> + Exit 1
> + set +e
> + exit 1
> + exit 1
> + remove_tmp_
> + __st=1
> + cleanup_
> + :
> + test = yes
> + cd /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests
> + chmod -R u+rwx /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests/gt-colors.1cSV
> + rm -rf /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests/gt-colors.1cSV
> + exit 1
> FAIL colors (exit status: 1)
>
> ============================================================================
> Testsuite summary for GNU diffutils 3.8.43-2d50
> ============================================================================
> # TOTAL: 23
> # PASS: 21
> # SKIP: 0
> # XFAIL: 1
> # FAIL: 1
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> See tests/test-suite.log
> Please report to bug-diffutils <at> gnu.org
> ============================================================================
> ```
>
> This is with GCC 12.2.1_p20221224.
>
> I've made the full log available at https://dev.gentoo.org/~sam/bugs/diffutils/ubsan-color-test/build.log
> and https://dev.gentoo.org/~sam/bugs/diffutils/ubsan-color-test/test-suite.log.
Hi Sam, thanks for the testing and the report.
Can you still reproduce that?
So far, I am unable to, at least at this commit: v3.8-49-gcc41598.
I started with an already-configured working directory,
ran "make clean", and then this:
ASAN_OPTIONS=detect_leaks=0 make CFLAGS='-O -ggdb3'
AM_CFLAGS=-fsanitize=undefined AM_LDFLAGS='-fsanitize=undefined
-static-libubsan' check TESTSUITEFLAGS=--jobs=55
and all tests passed.
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#60457
; Package
diffutils
.
(Sun, 08 Jan 2023 02:07:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 60457 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jan 7, 2023 at 6:02 PM Jim Meyering <jim <at> meyering.net> wrote:
>
> On Sat, Dec 31, 2022 at 1:55 PM Sam James <sam <at> gentoo.org> wrote:
> > Hi folks,
> >
> > I'm testing out the latest release previews from platform-testers in Gentoo and came across the following.
> >
> > diffutils' tests seem to fail (specifically the 'color' test) when built with UBSAN (-fsanitize=undefined):
> > ```
> > [...]
> > + mkfifo fifo
> > + printf %1000000s-a
> > + printf %1000000s-b
> > + + diff --color=always ---presume-output-tty a bhead
> > -c 10
> > util.c:205:3: runtime error: execution reached an unreachable program point
> > #0 0x558fa0c7ee3c in xsigismember /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:205
> > #1 0x558fa0c7f4e5 in install_signal_handlers /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:372
> > #2 0x558fa0c80f05 in check_color_output /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:822
> > #3 0x558fa0c81976 in begin_output /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:1017
> > #4 0x558fa0c7c63d in print_normal_hunk /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/normal.c:49
> > #5 0x558fa0c82cd1 in print_script /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/util.c:1303
> > #6 0x558fa0c7c5e5 in print_normal_script /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/normal.c:31
> > #7 0x558fa0c640cc in diff_2_files /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/analyze.c:665
> > #8 0x558fa0c6f28c in compare_files /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/diff.c:1488
> > #9 0x558fa0c69e11 in main /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/src/diff.c:851
> > #10 0x7fb6ab79664f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
> > #11 0x7fb6ab796708 in __libc_start_main_impl ../csu/libc-start.c:381
> > #12 0x558fa0c5a144 in _start ../sysdeps/x86_64/start.S:115
> >
> > + test 1 = 141
> > + fail=1
> > + Exit 1
> > + set +e
> > + exit 1
> > + exit 1
> > + remove_tmp_
> > + __st=1
> > + cleanup_
> > + :
> > + test = yes
> > + cd /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests
> > + chmod -R u+rwx /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests/gt-colors.1cSV
> > + rm -rf /var/tmp/portage/sys-apps/diffutils-3.8_p20221230/work/diffutils-3.8.43-2d50/tests/gt-colors.1cSV
> > + exit 1
> > FAIL colors (exit status: 1)
> >
> > ============================================================================
> > Testsuite summary for GNU diffutils 3.8.43-2d50
> > ============================================================================
> > # TOTAL: 23
> > # PASS: 21
> > # SKIP: 0
> > # XFAIL: 1
> > # FAIL: 1
> > # XPASS: 0
> > # ERROR: 0
> > ============================================================================
> > See tests/test-suite.log
> > Please report to bug-diffutils <at> gnu.org
> > ============================================================================
> > ```
> >
> > This is with GCC 12.2.1_p20221224.
> >
> > I've made the full log available at https://dev.gentoo.org/~sam/bugs/diffutils/ubsan-color-test/build.log
> > and https://dev.gentoo.org/~sam/bugs/diffutils/ubsan-color-test/test-suite.log.
>
> Hi Sam, thanks for the testing and the report.
> Can you still reproduce that?
Oh, nevermind. I've just noticed that Paul fixed it in v3.8-44-g7379990
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 05 Feb 2023 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.