[ccache] Bug in ccache 2.4

Ioannis Kappas loannis.kappas at SigmaTel.com
Wed Aug 3 09:53:53 GMT 2005


Hi,
 
      the following may fail on some systems due to a const char pointer being freed in failed() while still being referenced by ARGS
 
$ touch test.i
$ ccache cc -anything -c test.i
cc: Ð(¸V@°V@°V@: No such file or directory
cc: No input files
 
here is a patch that fixes the problem:
 
diff -rc ccache-2.4.original/ccache.c ccache-2.4/ccache.c
*** ccache-2.4.original/ccache.c Mon Sep 13 11:38:30 2004
--- ccache-2.4/ccache.c Wed Aug  3 10:23:49 2005
***************
*** 372,378 ****
    /* we are compiling a .i or .ii file - that means we
       can skip the cpp stage and directly form the
       correct i_tmpfile */
!   path_stdout = input_file;
    if (create_empty_file(path_stderr) != 0) {
     stats_update(STATS_ERROR);
     cc_log("failed to create empty stderr file\n");
--- 372,378 ----
    /* we are compiling a .i or .ii file - that means we
       can skip the cpp stage and directly form the
       correct i_tmpfile */
!   path_stdout = x_strdup(input_file);
    if (create_empty_file(path_stderr) != 0) {
     stats_update(STATS_ERROR);
     cc_log("failed to create empty stderr file\n");
 
 
 
--------
Ioannis Kappas, BSc, MSc
Software Engineer
Sigmatel, Cambridge, UK
ikappas at sigmatel.com <mailto:ikappas at sigmatel.com> 
www.sigmatel.com <http://www.sigmatel.com> 


More information about the ccache mailing list