Boost logo

Boost Users :

Subject: [Boost-users] [test] crash with the following test
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2010-09-22 13:07:08


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 <boost/test/included/unit_test.hpp>

BOOST_AUTO_TEST_CASE (parse_empty_import_documents)
{
}
-- test.cpp --

Any help would be appreciated.

-- 
Felipe Magno de Almeida

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net