]> git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Fix process_preprocessed_file bug for distcc marker
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 6 Apr 2022 19:37:04 +0000 (21:37 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 8 Apr 2022 06:02:12 +0000 (08:02 +0200)
commit5a55014f0c208bff61b8fe0eb1533c210553dd13
treef4caeec41dfc2de08ad3e796a5f6538f737b12ad
parent783b82cec759f94d5285c0c3c3e74e4797807812
fix: Fix process_preprocessed_file bug for distcc marker

2044fea84b86001b2976ecde946d3d6d0e88ec0a (included in ccache 4.6)
removed the special-casing of distcc’s pump in
process_preprocessed_file. That in turn revealed a bug that has been
present since 432d1ca6a6aa51f708124172169073c399fb68d2 (included in
ccache 3.4) but previously only affected compilations with distcc-pump
as the “compiler”: the detection and handling of distcc-pump’s
“__________” messages is broken in two ways:

1. It throws away everything between the last preprocessor directive and
   the “__________” marker. Thus, changes to such sections will not be
   included in the hash.
2. It detects “__________” markers in the middle of lines, not only at
   the beginning of lines.
src/ccache.cpp