Ticket #184 (closed defect: worksforme)

Opened 6 years ago

Last modified 6 years ago

Assertion failure when running tests under Valgrind

Reported by: Philip Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc:

Description

Running test_2_build_dbg in Valgrind with Memcheck results in the error:

file_cache.cpp(928): Assertion failed: "ret.second == true"
udbg_init: loading symbols from ./test_2_build_dbg.
Assertion failed: "ret.second == true"
Location: file_cache.cpp:928 (add)

Call stack:

(0x084d4c4b) file_cache.cpp:928 ExactBufOracle::add(unsigned char const*, unsigned int, unsigned char const*)
(0x084cdd47) file_cache.cpp:1128 file_buf_add_padding(unsigned char const*, unsigned int, unsigned int)
(0x084b472a) file_io.cpp:638 IOManager::run()
(0x084b2bc5) file_io.cpp:666 file_io(File*, long, unsigned int, unsigned char const**, long (*)(unsigned int, void const*, unsigned int, unsigned int*), unsigned int)
(0x084c4ef8) vfs_redirector.cpp:233 xfile_io(File*, long, unsigned int, unsigned char const**, long (*)(unsigned int, void const*, unsigned int, unsigned int*), unsigned int)
(0x084c6548) vfs.cpp:387 vfs_io(long long, unsigned int, unsigned char const**, long (*)(unsigned int, void const*, unsigned int, unsigned int*), unsigned int)
(0x084c6947) vfs.cpp:435 vfs_load(char const*, unsigned char const*&, unsigned int&, unsigned int, long (*)(unsigned int, void const*, unsigned int, unsigned int*), unsigned int)
(0x084bc6e6) archive_builder.cpp:142 read_and_compress_file
(0x084bc89b) archive_builder.cpp:215 archive_build_continue(ArchiveBuildState*)
(0x084bcb10) archive_builder.cpp:254 archive_build(char const*, char const**)
(0x0824303a) test_archive_builder.h:110 TestArchiveBuilder::test_create_archive_with_random_files()
(0x08243da6) test_archive_builder.cpp:24 TestDescription_TestArchiveBuilder_test_create_archive_with_random_files::runTest()
(0x08229333) RealDescriptions.cpp:96 CxxTest::RealTestDescription::run()
(0x0822b92c) TestRunner.h:75 CxxTest::TestRunner::runTest(CxxTest::TestDescription&)
(0x0822ba04) TestRunner.h:59 CxxTest::TestRunner::runSuite(CxxTest::SuiteDescription&)
(0x0822baf5) TestRunner.h:44 CxxTest::TestRunner::runWorld()

errno = 0 (?)
OS error = ?

It works correctly when run outside Valgrind, and when run with valgrind --tool=none. (I haven't investigated whether this is a real problem in our code or not.)

Change History

comment:1 Changed 6 years ago by Philip

  • Status changed from new to closed
  • Resolution set to worksforme

Can't reproduce this failure now.

Note: See TracTickets for help on using tickets.