FlightCrew CLI segfaults for bionic but not xenial

Bug #1836217 reported by Mike Salvatore
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flightcrew (Ubuntu)
New
Low
Unassigned

Bug Description

Certain input causes a segmentation fault in the FlightCrew versions packaged for bionic and later.

To reproduce, run on both xenial and bionic/cosmic/disco:

sudo apt-get install flightcrew
flightcrew-cli --input-file flightcrew_ubuntu_crash.epub

Output on xenial:

flightcrew_ubuntu_crash.epub/META-INF/container.xml(1): error 900: unsupported XML version '1..'

Output on bionic:

Unknown exception!
Segmentation fault (core dumped)

Valgrind output for bionic:

valgrind flightcrew-cli compost/flightcrew_ubuntu_crash.epub
==2087== Memcheck, a memory error detector
==2087== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2087== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==2087== Command: flightcrew-cli compost/flightcrew_ubuntu_crash.epub
==2087==
Unknown exception!
==2087== Invalid read of size 8
==2087== at 0x66A5614: xercesc_3_2::DOMException::~DOMException() (in /usr/lib/x86_64-linux-gnu/libxerces-c-3.2.so)
==2087== by 0x5538C6E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==2087== by 0x1164E1: main (in /usr/bin/flightcrew-cli)
==2087== Address 0xe8e4820 is 0 bytes inside a block of size 8 free'd
==2087== at 0x4C3123B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2087== by 0x667741F: xercesc_3_2::XMLPlatformUtils::Terminate() (in /usr/lib/x86_64-linux-gnu/libxerces-c-3.2.so)
==2087== by 0x4EC2A10: FlightCrew::ValidateEpubRootFolder(boost::filesystem::path const&) (in /usr/lib/libFlightCrew.so.0.7.2)
==2087== by 0x4EC2BE1: FlightCrew::ValidateEpub(boost::filesystem::path const&) (in /usr/lib/libFlightCrew.so.0.7.2)
==2087== by 0x4F3DF0E: FlightCrew::ValidateEpub(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libFlightCrew.so.0.7.2)
==2087== by 0x116989: ValidateFiles(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (in /usr/bin/flightcrew-cli)
==2087== by 0x1163E3: main (in /usr/bin/flightcrew-cli)
==2087== Block was alloc'd at
==2087== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2087== by 0x6677FFE: xercesc_3_2::XMLPlatformUtils::Initialize(char const*, char const*, xercesc_3_2::PanicHandler*, xercesc_3_2::MemoryManager*) (in /usr/lib/x86_64-linux-gnu/libxerces-c-3.2.so)
==2087== by 0x4EC26F6: FlightCrew::ValidateEpubRootFolder(boost::filesystem::path const&) (in /usr/lib/libFlightCrew.so.0.7.2)
==2087== by 0x4EC2BE1: FlightCrew::ValidateEpub(boost::filesystem::path const&) (in /usr/lib/libFlightCrew.so.0.7.2)
==2087== by 0x4F3DF0E: FlightCrew::ValidateEpub(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libFlightCrew.so.0.7.2)
==2087== by 0x116989: ValidateFiles(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (in /usr/bin/flightcrew-cli)
==2087== by 0x1163E3: main (in /usr/bin/flightcrew-cli)
==2087==
==2087==
==2087== HEAP SUMMARY:
==2087== in use at exit: 0 bytes in 0 blocks
==2087== total heap usage: 7,020 allocs, 7,020 frees, 2,272,769 bytes allocated
==2087==
==2087== All heap blocks were freed -- no leaks are possible
==2087==
==2087== For counts of detected and suppressed errors, rerun with: -v
==2087== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Additional information:

There are minor code differences between bionic and xenial that I would not expect to cause this bug. To verify, I backported the bionic version of flightcrew to xenial. There was no segmentation fault when running the backported flightcrew on xenial.

Revision history for this message
Mike Salvatore (mikesalvatore) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.