Bug 799347 - path_utils:test_path_concat_neg fails on 64-bit big endians
Summary: path_utils:test_path_concat_neg fails on 64-bit big endians
Alias: None
Product: Fedora
Classification: Fedora
Component: ding-libs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 801393
TreeView+ depends on / blocked
Reported: 2012-03-02 14:48 UTC by Dan Horák
Modified: 2020-05-02 16:47 UTC (History)
5 users (show)

Fixed In Version: ding-libs-0.1.3-8.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 801393 (view as bug list)
Last Closed: 2012-03-21 18:51:32 UTC
Type: ---

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 2272 0 None None None 2020-05-02 16:47:32 UTC

Description Dan Horák 2012-03-02 14:48:37 UTC
The test_path_concat_neg test from path_utils fails on s390x and ppc64 (aka 64-bit big endians) with 

Running suite(s): path_utils
*** stack smashing detected ***: /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut terminated
======= Backtrace: =========
======= Memory map: ========
80000000-8000a000 r-xp 00000000 fd:00 2626645                            /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut
8000a000-8000b000 r-xp 00009000 fd:00 2626645                            /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut
8000b000-8000c000 rwxp 0000a000 fd:00 2626645                            /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut
bd579000-bd59a000 rw-p 00000000 00:00 0                                  [heap]
3fffd0a4000-3fffd0b4000 r-xp 00000000 fd:00 2359681                      /usr/lib64/libgcc_s-4.7.0-20120229.so.1
3fffd0b4000-3fffd0b5000 rwxp 00010000 fd:00 2359681                      /usr/lib64/libgcc_s-4.7.0-20120229.so.1
3fffd0b9000-3fffd0bb000 rwxp 00000000 00:00 0 
3fffd0bb000-3fffd0d6000 r-xp 00000000 fd:00 2360818                      /usr/lib64/libpthread-2.15.so
3fffd0d6000-3fffd0d7000 r-xp 0001a000 fd:00 2360818                      /usr/lib64/libpthread-2.15.so
3fffd0d7000-3fffd0d8000 rwxp 0001b000 fd:00 2360818                      /usr/lib64/libpthread-2.15.so
3fffd0d8000-3fffd0dc000 rwxp 00000000 00:00 0 
3fffd0dc000-3fffd285000 r-xp 00000000 fd:00 2360792                      /usr/lib64/libc-2.15.so
3fffd285000-3fffd289000 r-xp 001a8000 fd:00 2360792                      /usr/lib64/libc-2.15.so
3fffd289000-3fffd28b000 rwxp 001ac000 fd:00 2360792                      /usr/lib64/libc-2.15.so
3fffd28b000-3fffd28f000 rwxp 00000000 00:00 0 
3fffd28f000-3fffd292000 r-xp 00000000 fd:00 2626507                      /builddir/build/BUILD/ding-libs-0.1.3/.libs/libpath_utils.so.1.0.0
3fffd292000-3fffd293000 r-xp 00002000 fd:00 2626507                      /builddir/build/BUILD/ding-libs-0.1.3/.libs/libpath_utils.so.1.0.0
3fffd293000-3fffd294000 rwxp 00003000 fd:00 2626507                      /builddir/build/BUILD/ding-libs-0.1.3/.libs/libpath_utils.so.1.0.0
3fffd294000-3fffd295000 rwxp 00000000 00:00 0 
3fffd295000-3fffd29d000 r-xp 00000000 fd:00 2364406                      /usr/lib64/libcheck.so.0.0.0
3fffd29d000-3fffd29e000 r-xp 00007000 fd:00 2364406                      /usr/lib64/libcheck.so.0.0.0
3fffd29e000-3fffd29f000 rwxp 00008000 fd:00 2364406                      /usr/lib64/libcheck.so.0.0.0
3fffd2a0000-3fffd2a1000 rwxp 00000000 00:00 0 
3fffd2a1000-3fffd2a6000 rwxp 00000000 00:00 0 
3fffd2a6000-3fffd2a8000 r-xp 00000000 00:00 0                            [vdso]
3fffd2a8000-3fffd2c9000 r-xp 00000000 fd:00 2360785                      /usr/lib64/ld-2.15.so
3fffd2c9000-3fffd2ca000 r-xp 00020000 fd:00 2360785                      /usr/lib64/ld-2.15.so
3fffd2ca000-3fffd2cb000 rwxp 00021000 fd:00 2360785                      /usr/lib64/ld-2.15.so
3fffd2cb000-3fffd2cc000 rw-p 00000000 00:00 0 
3ffffd13000-3ffffd28000 rw-p 00000000 00:00 0                            [stack]
95%: Checks: 24, Failures: 0, Errors: 1
path_utils/path_utils_ut.c:253:E:path_utils:test_path_concat_neg:0: (after this point) Received signal 6 (Aborted)
FAIL: path_utils_ut

This is log from s390x - http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=609982, ppc64 only show a failure not the backtrace - http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=414594

Version-Release number of selected component (if applicable):

Additional information:
The crash first appeared when built with gcc 4.7. Both ppc and s390 builds (32-bit)) are OK.

Comment 1 Stephen Gallagher 2012-03-05 21:06:34 UTC
Reassigning to glibc. The exact same SRPM builds successfully in Koji against EPEL 6: http://koji.fedoraproject.org/koji/taskinfo?taskID=3853151
but fails against Fedora 17: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=419468

I assume something broke in the compiler between then and now.

Comment 2 Dan Horák 2012-03-05 21:57:06 UTC
So there are 2 more things that I could try - F-16 gcc 4.6 with F-17 glibc (this combination should work) and F-17 gcc 4.7 with F-16 glibc (if possible at all).

On the other side the usual answer to "stack smashing detected" is that the application is wrong.

Comment 3 Jeff Law 2012-03-06 04:54:13 UTC
You're hitting a FOTIFY_SOURCE failure.  The *vast* majority of the time this is going to be a failure in the source package.  See the first two frames in the backtrace.

FORTIFY_SOURCE is a set of static and dynamic checks to detect common errors, particularly buffer overflows, overflows of fd_sets and the like.

Fedora 17 includes a newer glibc which has more checks, so that could easily explain the behaviour reported in c#1.

I'm reassigning this back to ding-libs until there's some solid evidence this is a glibc issue.

Comment 4 Stephen Gallagher 2012-03-06 16:20:24 UTC
Sorry for the noise. I did manage to identify the issue as an off-by-one error writing to a static buffer. A patch has now been submitted upstream.

Comment 5 Jeff Law 2012-03-06 16:27:12 UTC
No problem.  Glad you were able to track it down.

Comment 6 Stephen Gallagher 2012-03-06 16:40:18 UTC
Upstream ticket:

Comment 7 Fedora Update System 2012-03-16 12:49:03 UTC
ding-libs-0.1.3-8.fc17 has been submitted as an update for Fedora 17.

Comment 8 Fedora Update System 2012-03-16 19:03:30 UTC
Package ding-libs-0.1.3-8.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ding-libs-0.1.3-8.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-03-21 18:51:32 UTC
ding-libs-0.1.3-8.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.