[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#812251: apt: suddenly segfaults after "apt update"



Um 14:49 Uhr am 23.01.16 schrieb Julian Andres Klode:

> 
>   https://github.com/julian-klode/apt/compare/master...julian-klode:bugfix/remap-stringview
> 
> I cannot reproduce the issue locally though, so I might have missed
> something. If you still can, it would be great if you could build
> libapt-pkg5.0 from that and see if you can reproduce it or if it works
> now.

I got the diff from git https://anonscm.debian.org/cgit/apt/apt.git/diff/?id=7dd0c2e 
and tried to build apt in a Sid chroot with cowbuilder, but the build fails with the
following messages:

Compiling pkgcachegen.cc to ../build/obj/apt-pkg/pkgcachegen.opic
g++ -c -MD -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_CONFIG_H -D_REENTRANT -D_FORTIFY_SOURCE=2 -I../build/include -DAPT_DOMAIN='"libapt-pkg5.0"' -std=c++11 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef -DAPT_PKG_EXPOSE_STRING_VIEW -fPIC -DPIC -o ../build/obj/apt-pkg/pkgcachegen.opic '/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc'
In file included from ../build/include/apt-pkg/pkgcachegen.h:23:0,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
../build/include/apt-pkg/pkgcache.h: In member function 'APT::StringView pkgCache::ViewString(map_stringitem_t) const':
../build/include/apt-pkg/pkgcache.h:252:80: warning: cast from 'char*' to 'const uint16_t* {aka const short unsigned int*}' increases required alignment of target type [-Wcast-align]
       uint16_t len = *reinterpret_cast<const uint16_t*>(name - sizeof(uint16_t));
                                                                                ^
/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc: In member function 'void pkgCacheGenerator::ReMap(const void*, const void*)':
/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:183:57: error: 'oldSize' was not declared in this scope
   || ViewP->data() > static_cast<const char*>(oldMap) + oldSize)
                                                         ^
In file included from ../build/include/apt-pkg/strutl.h:31:0,
                 from ../build/include/apt-pkg/hashsum_template.h:20,
                 from ../build/include/apt-pkg/md5.h:28,
                 from ../build/include/apt-pkg/pkgcachegen.h:21,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc: In member function 'bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator&, APT::StringView, APT::StringView)':
/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:563:31: warning: 'pkgCache::Package::Name' is deprecated: Use the .Name() method instead of accessing the member directly [-Wdeprecated-declarations]
    APT_IGNORE_DEPRECATED(Pkg->Name = Grp->Name;)
                               ^
../build/include/apt-pkg/macros.h:147:3: note: in definition of macro 'APT_IGNORE_DEPRECATED'
   XXX \
   ^
In file included from ../build/include/apt-pkg/pkgcachegen.h:23:0,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
../build/include/apt-pkg/pkgcache.h:443:107: note: declared here
    APT_DEPRECATED_MSG("Use the .Name() method instead of accessing the member directly") map_stringitem_t Name;
                                                                                                           ^
In file included from ../build/include/apt-pkg/strutl.h:31:0,
                 from ../build/include/apt-pkg/hashsum_template.h:20,
                 from ../build/include/apt-pkg/md5.h:28,
                 from ../build/include/apt-pkg/pkgcachegen.h:21,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:563:31: warning: 'pkgCache::Package::Name' is deprecated: Use the .Name() method instead of accessing the member directly [-Wdeprecated-declarations]
    APT_IGNORE_DEPRECATED(Pkg->Name = Grp->Name;)
                               ^../build/include/apt-pkg/macros.h:147:3: note: in definition of macro 'APT_IGNORE_DEPRECATED'
   XXX \
   ^
In file included from ../build/include/apt-pkg/pkgcachegen.h:23:0,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
../build/include/apt-pkg/pkgcache.h:443:107: note: declared here
    APT_DEPRECATED_MSG("Use the .Name() method instead of accessing the member directly") map_stringitem_t Name;
                                                                                                           ^
In file included from ../build/include/apt-pkg/strutl.h:31:0,
                 from ../build/include/apt-pkg/hashsum_template.h:20,
                 from ../build/include/apt-pkg/md5.h:28,
                 from ../build/include/apt-pkg/pkgcachegen.h:21,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:563:31: warning: 'pkgCache::Package::Name' is deprecated: Use the .Name() method instead of accessing the member directly [-Wdeprecated-declarations]
    APT_IGNORE_DEPRECATED(Pkg->Name = Grp->Name;)
                               ^
../build/include/apt-pkg/macros.h:147:3: note: in definition of macro 'APT_IGNORE_DEPRECATED'
   XXX \
   ^
In file included from ../build/include/apt-pkg/pkgcachegen.h:23:0,
                 from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15:
../build/include/apt-pkg/pkgcache.h:443:107: note: declared here
    APT_DEPRECATED_MSG("Use the .Name() method instead of accessing the member directly") map_stringitem_t Name;
                                                                                                           ^
../buildlib/library.mak:69: recipe for target '../build/obj/apt-pkg/pkgcachegen.opic' failed
make[2]: *** [../build/obj/apt-pkg/pkgcachegen.opic] Error 1
make[2]: Leaving directory '/build/apt-1.2.0~sh.1/apt-pkg'
Makefile:14: recipe for target 'binary' failed
make[1]: *** [binary] Error 2
make[1]: Leaving directory '/build/apt-1.2.0~sh.1'
debian/rules:103: recipe for target 'build/build-binary-stamp' failed
make: *** [build/build-binary-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Grüße,
Sven.


Reply to: