Bug 783971

Summary: the gcc wrapper segfaults when invoked from a non-existing directory
Product: [Fedora] Fedora Reporter: Kamil Dudka <kdudka>
Component: ccacheAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: joel, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 22:15:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kamil Dudka 2012-01-23 12:07:37 UTC
Version-Release number of selected component (if applicable):
ccache-3.1.7-1.fc17.x86_64


How reproducible:
100%


Steps to Reproduce:
touch test.c
mkdir dir
cd dir
rmdir ../dir
/usr/lib64/ccache/gcc -c ../test.c

  
Actual results:
Segmentation fault


Additional info:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000408a66 in args_strip (args=0x0, prefix=prefix@entry=0x40d660 "--ccache-") at args.c:136
136     {
(gdb) bt full
#0  0x0000000000408a66 in args_strip (args=0x0, prefix=prefix@entry=0x40d660 "--ccache-") at args.c:136
        i = 0
#1  0x0000000000402415 in failed () at ccache.c:216
        e = <optimized out>
#2  0x0000000000405bbf in ccache_main (argc=3, argv=0x7fffffffe3f8) at ccache.c:2166
        p = 0x0
        program_name = <optimized out>
#3  0x00007ffff774e745 in __libc_start_main (main=0x4021f0 <main>, argc=3, ubp_av=0x7fffffffe3f8, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffe3e8) at libc-start.c:226
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -3486476092807516045, 4203000, 140737488348144, 0, 0, 3486476093719900275, 3486457496437715059},
              mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x40cd20, 0x7fffffffe3f8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 4246816}}}
        not_first_call = <optimized out>
#4  0x0000000000402221 in _start ()

Comment 1 Ville Skyttä 2012-01-24 17:27:25 UTC
Reproduced, Cc'ing upstream.

Comment 2 Fedora Update System 2012-08-18 19:55:04 UTC
ccache-3.1.8-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/ccache-3.1.8-1.fc18

Comment 3 Fedora Update System 2012-08-19 16:48:54 UTC
Package ccache-3.1.8-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ccache-3.1.8-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12222/ccache-3.1.8-1.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-09-17 22:15:24 UTC
ccache-3.1.8-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.