<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/contrib/mmap.cc, branch 1.4_beta2</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.4_beta2</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.4_beta2'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2016-01-08T20:20:25Z</updated>
<entry>
<title>Store the size of strings in the cache</title>
<updated>2016-01-08T20:20:25Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-08T10:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=60d523e2ae93a6c5bc396b6bede2544271fb1f2e'/>
<id>urn:sha1:60d523e2ae93a6c5bc396b6bede2544271fb1f2e</id>
<content type='text'>
By storing the size of the string in the cache, we can make use of
it when comparing the names in the hashtable in pkgCache::FindGrp.
</content>
</entry>
<entry>
<title>mmap: Define _DEFAULT_SOURCE instead of _BSD_SOURCE</title>
<updated>2015-12-11T14:02:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2015-12-11T14:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f9d8a91570788b676cabceede3229860ad76734e'/>
<id>urn:sha1:f9d8a91570788b676cabceede3229860ad76734e</id>
<content type='text'>
Fixes a warning reported by gcc.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>do not segfault in cache generation on mmap failure</title>
<updated>2015-11-19T23:54:07Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-11-19T23:54:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6789e01e9370b3b7f65d52138c5657eaa712b4d1'/>
<id>urn:sha1:6789e01e9370b3b7f65d52138c5657eaa712b4d1</id>
<content type='text'>
Out of memory and similar circumstanzas could cause MMap::Map to fail
and especially the mmap/malloc calls in it. With some additional
checking we can avoid segfaults and similar in such situations – at
least in theory as if this is a real out of memory everything we do to
handle the error could just as well run into a memory problem as well…

But at least in theory (if MMap::Map is made to fail always) we can deal
with it so good that a user actually never sees a failure (as the cache
it tries to load with it fails and is discarded, so that DynamicMMap
takes over and a new one is build) instead of segfaulting.

Closes: 803417
</content>
</entry>
<entry>
<title>avoid using global PendingError to avoid failing too often too soon</title>
<updated>2015-09-14T13:22:18Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-09-10T17:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=95278287f4e1eeaf5d96749d6fc9bfc53fb400d0'/>
<id>urn:sha1:95278287f4e1eeaf5d96749d6fc9bfc53fb400d0</id>
<content type='text'>
Our error reporting is historically grown into some kind of mess.
A while ago I implemented stacking for the global error which is used in
this commit now to wrap calls to functions which do not report (all)
errors via return, so that only failures in those calls cause a failure
to propergate down the chain rather than failing if anything
(potentially totally unrelated) has failed at some point in the past.

This way we can avoid stopping the entire acquire process just because a
single source produced an error for example. It also means that after
the acquire process the cache is generated – even if the acquire
process had failures – as we still have the old good data around we can and
should generate a cache for (again).

There are probably more instances of this hiding, but all these looked
like the easiest to work with and fix with reasonable (aka net-positive)
effects.
</content>
</entry>
<entry>
<title>cleanup headers and especially #includes everywhere</title>
<updated>2014-03-13T12:58:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2014-03-05T21:11:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=453b82a388013e522b3a1b9fcd6ed0810dab1f4f'/>
<id>urn:sha1:453b82a388013e522b3a1b9fcd6ed0810dab1f4f</id>
<content type='text'>
Beside being a bit cleaner it hopefully also resolves oddball problems
I have with high levels of parallel jobs.

Git-Dch: Ignore
Reported-By: iwyu (include-what-you-use)
</content>
</entry>
<entry>
<title>warning: useless cast to type A [-Wuseless-cast]</title>
<updated>2014-03-13T12:58:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2014-02-27T01:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e788a834ce421042e727b72e43177edaa47e53a7'/>
<id>urn:sha1:e788a834ce421042e727b72e43177edaa47e53a7</id>
<content type='text'>
Git-Dch: Ignore
Reported-By: gcc -Wuseless-cast
</content>
</entry>
<entry>
<title>rework some code to fix some scan-build warnings</title>
<updated>2014-01-16T18:51:23Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2014-01-16T18:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=62d8a765b9b37354efab6ca838cbdb7f347f7cac'/>
<id>urn:sha1:62d8a765b9b37354efab6ca838cbdb7f347f7cac</id>
<content type='text'>
No visible functional changes, just code moved around and additional
checks to eliminate impossible branches

Reported-By: scan-build
Git-Dch: Ignore
</content>
</entry>
<entry>
<title>move the sysconf call behind the _POSIX_SYNCHRONIZED_IO guard there</title>
<updated>2012-08-04T08:24:47Z</updated>
<author>
<name>David Kalnischkies</name>
<email>kalnischkies@gmail.com</email>
</author>
<published>2012-08-04T08:24:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e3348f474f0251a4be0cb0cb7ae8a07ad746311b'/>
<id>urn:sha1:e3348f474f0251a4be0cb0cb7ae8a07ad746311b</id>
<content type='text'>
it is used for the msync call
</content>
</entry>
<entry>
<title>apt-pkg/contrib/mmap.cc:</title>
<updated>2012-08-04T08:20:30Z</updated>
<author>
<name>Pino Toscano</name>
<email>pino@debian.org</email>
</author>
<published>2012-08-04T08:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3ac981df108470b42b89d0d4a816a5e3ba58c501'/>
<id>urn:sha1:3ac981df108470b42b89d0d4a816a5e3ba58c501</id>
<content type='text'>
- guard only the msync call with _POSIX_SYNCHRONIZED_IO rather
  than also the fallback code as it breaks APT on hurd since 0.9.7.3
  as the fallback is now always used on non-linux (Closes: #683354)
</content>
</entry>
<entry>
<title>for filesystems not supporting mmap'ing a file we need to use a</title>
<updated>2012-07-24T15:22:25Z</updated>
<author>
<name>David Kalnischkies</name>
<email>kalnischkies@gmail.com</email>
</author>
<published>2012-07-24T15:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=fbda0ee9d9f5ecd34d38f0e416837e8ef3a10f68'/>
<id>urn:sha1:fbda0ee9d9f5ecd34d38f0e416837e8ef3a10f68</id>
<content type='text'>
SyncToFd dummy just as we did for compressed files in 0.9.5</content>
</entry>
</feed>
