[test] crash with the following test

With boost 1.44.0 (the same happens with 1.43) the following test
causes a crash in framework.ipp:388 with a dereference of a NULL
pointer. The test_unit* res returns NULL from
s_frk_impl().m_test_units[id] where id is 1.
id is equal to 1 because when unit_test::framework::run is ran, id is
INV_TEST_UNIT_ID is passed to it. Then in framework.ipp:399 if id ==
INV_TEST_UNIT_ID id is assigned the value in master_test_suite().p_id
which is 1.
I've verified that when master_test_suite is constructed it assigns
INV_TEST_UNIT_ID to p_id, so I'm lost why this is 1 here.
Then, back in framework.ipp:386 s_frk_impl().m_test_units there's only
one element in the map and the id is 65535 and not one.
-- test.cpp --
#define BOOST_TEST_MODULE parse_empty_import_documents
#include

[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
With boost 1.44.0 (the same happens with 1.43) the following test causes a crash in framework.ipp:388 with a dereference of a NULL pointer. [...]
-- test.cpp -- #define BOOST_TEST_MODULE parse_empty_import_documents #include
BOOST_AUTO_TEST_CASE (parse_empty_import_documents) { } -- test.cpp --
Does the crash disappear if you give your auto test case and your test module different names? -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/ Legalize Adulthood! http://legalizeadulthood.wordpress.com

On Wed, Sep 22, 2010 at 6:07 PM, Richard
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
thusly: With boost 1.44.0 (the same happens with 1.43) the following test causes a crash in framework.ipp:388 with a dereference of a NULL pointer. [...]
-- test.cpp -- #define BOOST_TEST_MODULE parse_empty_import_documents #include
BOOST_AUTO_TEST_CASE (parse_empty_import_documents) { } -- test.cpp --
Does the crash disappear if you give your auto test case and your test module different names?
No, the crash happens exactly the same if I change the module test name to parse_empty_import_documents_module.
-- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
Regards, -- Felipe Magno de Almeida
participants (2)
-
Felipe Magno de Almeida
-
legalize+jeeves@mail.xmission.com