<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ccache.git/src/hashutil.cpp, branch master</title>
<subtitle>github.com: ccache/ccache
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/'/>
<entry>
<title>refactor: Improve InodeCache::get signature</title>
<updated>2023-03-07T19:40:10+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2023-03-07T19:40:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=a179db209ba347209682b19298f5c4d4b4d4a5c7'/>
<id>a179db209ba347209682b19298f5c4d4b4d4a5c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: Use util::BitSet for hash_source_code_file</title>
<updated>2023-03-07T19:17:35+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2023-03-06T19:26:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=38ab9d38b52c873da1338f4d5eb58edb2ad5c2bc'/>
<id>38ab9d38b52c873da1338f4d5eb58edb2ad5c2bc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: Use util::BitSet for core::Sloppiness</title>
<updated>2023-03-05T20:42:16+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2023-03-05T11:25:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=03023ee78c0a34aab305ff61b2851248eb77c673'/>
<id>03023ee78c0a34aab305ff61b2851248eb77c673</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: Fix edge case where a non-temporal identifier is misidentified (#1227)</title>
<updated>2022-11-27T20:32:36+00:00</updated>
<author>
<name>Erik Flodin</name>
<email>erik@flodin.me</email>
</author>
<published>2022-11-27T20:32:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=e104ef081ef235e18ae8d6ce6e98b9a0a59633b9'/>
<id>e104ef081ef235e18ae8d6ce6e98b9a0a59633b9</id>
<content type='text'>
If a non-temporal identifier, that ends with a temporal macro, happens
to be at the end of the buffer with the temporal suffix starting on the
avx boundary, then it would be incorrectly classified as a temporal
macro. This since the helper function lacks the context to see that the
data before the match is something that invalidates the match.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a non-temporal identifier, that ends with a temporal macro, happens
to be at the end of the buffer with the temporal suffix starting on the
avx boundary, then it would be incorrectly classified as a temporal
macro. This since the helper function lacks the context to see that the
data before the match is something that invalidates the match.</pre>
</div>
</content>
</entry>
<entry>
<title>chore: Improve logging of file read failures</title>
<updated>2022-11-02T18:18:21+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2022-11-02T18:18:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=c5e1f88e22987365754e26c0f8a4e51cf572018f'/>
<id>c5e1f88e22987365754e26c0f8a4e51cf572018f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: Use FMT macro to format exception messages</title>
<updated>2022-08-24T17:16:48+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2022-08-23T16:21:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=a4ab84f94574a8210373cfc69a7f8e1a7f355dcf'/>
<id>a4ab84f94574a8210373cfc69a7f8e1a7f355dcf</id>
<content type='text'>
Using the FMT macro explicitly makes invalid format message
constructions compile-time errors instead of run-time errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the FMT macro explicitly makes invalid format message
constructions compile-time errors instead of run-time errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: Use util::{read_fd,read_file,write_file} functions</title>
<updated>2022-08-15T20:13:32+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2022-08-15T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=3c55dbffd2bdbba1825b0ae982537a9de10f2b76'/>
<id>3c55dbffd2bdbba1825b0ae982537a9de10f2b76</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: Hash time information on inode cache hit</title>
<updated>2022-08-03T19:00:35+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2022-08-03T08:04:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=561be2085df94b3c35dd803e56668e6feafc93b7'/>
<id>561be2085df94b3c35dd803e56668e6feafc93b7</id>
<content type='text'>
As mentioned in discussion #1086: If the inode cache is enabled,
hash_source_code_file will on an inode cache hit fail to hash time
information if there are temporal macros in the code. This is because
hash_source_code_string (called from hash_source_code_file via
hash_source_code_file_nocache) on an inode cache miss adds time
information to the hash in case one of those macros were found. However,
on an inode cache hit the return value of hash_source_code_file will be
correctly fetched from the cache, but the hash sum will only be updated
with (the hash of) the include file and not the time information.

The fix is to let the inode cache only cache the effects of hashing the
file and checking for macros, not the hashing of time information since
that's volatile.

After the fix:

- The new do_hash_file function performs file hashing and macro
  checking. The inode cache caches this step.
- hash_source_code_file returns a Digest instead of adding data to a
  Hash.
- hash_source_code_file calls do_hash_file and then potentially hashes
  time information. If there are no temporal macros the returned digest
  will be identical to the file hash, otherwise the returned digest will
  be of a hash of file content hash + time information.

This also improves hashes that are stored in the direct mode manifest:
Previously they were always the hash of the file content hash but now
they are just the file content hash in the common case when there is no
__DATE__ or __TIMESTAMP__ macro in the file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As mentioned in discussion #1086: If the inode cache is enabled,
hash_source_code_file will on an inode cache hit fail to hash time
information if there are temporal macros in the code. This is because
hash_source_code_string (called from hash_source_code_file via
hash_source_code_file_nocache) on an inode cache miss adds time
information to the hash in case one of those macros were found. However,
on an inode cache hit the return value of hash_source_code_file will be
correctly fetched from the cache, but the hash sum will only be updated
with (the hash of) the include file and not the time information.

The fix is to let the inode cache only cache the effects of hashing the
file and checking for macros, not the hashing of time information since
that's volatile.

After the fix:

- The new do_hash_file function performs file hashing and macro
  checking. The inode cache caches this step.
- hash_source_code_file returns a Digest instead of adding data to a
  Hash.
- hash_source_code_file calls do_hash_file and then potentially hashes
  time information. If there are no temporal macros the returned digest
  will be identical to the file hash, otherwise the returned digest will
  be of a hash of file content hash + time information.

This also improves hashes that are stored in the direct mode manifest:
Previously they were always the hash of the file content hash but now
they are just the file content hash in the common case when there is no
__DATE__ or __TIMESTAMP__ macro in the file.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: Support masquerading as a compiler via copy or hard link</title>
<updated>2022-06-10T17:54:37+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2022-06-10T14:17:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=451d92c801d6463bcc54c090b871a1d77f26d9d4'/>
<id>451d92c801d6463bcc54c090b871a1d77f26d9d4</id>
<content type='text'>
Setting up ccache to masquerade as a compiler has always meant using
symbolic links, but there is no technical reason why that has to be the
case. This commit adds support for masquerading via a copy or hard link
of the ccache executable as well. This is mostly useful on platforms or
file systems where symbolic links are not supported.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting up ccache to masquerade as a compiler has always meant using
symbolic links, but there is no technical reason why that has to be the
case. This commit adds support for masquerading via a copy or hard link
of the ccache executable as well. This is mostly useful on platforms or
file systems where symbolic links are not supported.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: Replace nonstd::string_view with std::string_view</title>
<updated>2022-05-23T17:16:29+00:00</updated>
<author>
<name>Joel Rosdahl</name>
<email>joel@rosdahl.net</email>
</author>
<published>2022-05-17T19:55:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ccache.git/commit/?id=60005c836ac34d7ee42e3f57e441ea97c0e321ad'/>
<id>60005c836ac34d7ee42e3f57e441ea97c0e321ad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
