Bug 1382162 - abipkgdiff crashes with SIGABRT if XDG_CACHE_HOME does not exist
Summary: abipkgdiff crashes with SIGABRT if XDG_CACHE_HOME does not exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libabigail
Version: 26
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Sinny Kumari
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-05 22:27 UTC by Orion Poplawski
Modified: 2018-02-01 09:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-01 09:20:22 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 20670 0 None None None 2016-10-06 08:10:18 UTC

Description Orion Poplawski 2016-10-05 22:27:36 UTC
Description of problem:

XDG_CACHE_HOME=/var/cache/user/root
# ls /var/cache/user/root
ls: cannot access '/var/cache/user/root': No such file or directory

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
58      }
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x00007ffff630756a in __GI_abort () at abort.c:89
#2  0x000055555555bf28 in package::extracted_packages_parent_dir[abi:cxx11]() ()
    at abipkgdiff.cc:574
#3  0x0000555555561887 in package::package (this=0x55555577d010,
    path="/data/repos/fedora/development/rawhide/Everything/x86_64/os/Packages/f/fftw-libs-double-3.3.4-7.fc24.x86_64.rpm", dir="package1", pkg_kind=package::KIND_MAIN) at abipkgdiff.cc:314
#4  0x000055555555935e in main (argc=<optimized out>, argv=<optimized out>)
    at abipkgdiff.cc:2003
(gdb) up
#1  0x00007ffff630756a in __GI_abort () at abort.c:89
89            raise (SIGABRT);
(gdb) up
#2  0x000055555555bf28 in package::extracted_packages_parent_dir[abi:cxx11]() ()
    at abipkgdiff.cc:574
574             abort();
(gdb) list
569
570           string libabigail_tmp_dir_template = p;
571           libabigail_tmp_dir_template += "/abipkgdiff-tmp-dir-XXXXXX";
572
573           if (!mkdtemp(const_cast<char*>(libabigail_tmp_dir_template.c_str())))
574             abort();
575
576           p = libabigail_tmp_dir_template;
577         }
578
(gdb) print libabigail_tmp_dir_template
$1 = "/var/cache/user/root/abipkgdiff-tmp-dir-35vxEo"

Version-Release number of selected component (if applicable):
libabigail-1.0-0.8.rc5.5.fc26.x86_64

It's hard to tell from https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html but if the directory doesn't exist I believe programs should create it with 0700 permissions.

Comment 1 Dodji Seketeli 2016-10-06 08:10:19 UTC
Right, I confirm this.  This is a real bug.

I have filed it upstream at https://sourceware.org/bugzilla/show_bug.cgi?id=20670.

Thank you for taking time to file this problem!

Comment 2 Dodji Seketeli 2016-11-30 09:45:31 UTC
This bug was fixed upstream.  Details are at https://sourceware.org/bugzilla/show_bug.cgi?id=20670.

The fix should be available in the 1.0.rc7 tarball.

Comment 3 Fedora End Of Life 2017-02-28 10:25:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.


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