This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

kernel tests memvar1 and kmemvar1


Both of the kernel tests memvar1 and kmemvar1 have a routine

static void check_in_mp0(cyg_uint8 *p, cyg_int32 size)
{
    CYG_TEST_CHECK(NULL != p,
                   "Allocation failed");
    CYG_TEST_CHECK(mem[0] <= p && p+size < mem[1],
                   "Block outside memory pool");
}

I believe the second test should be

CYG_TEST_CHECK(mem[0] <= p && p+size <= mem[1],
                   "Block outside memory pool");

The upper bound should allow the equal case, or
perhaps even better

CYG_TEST_CHECK(mem[0] <= p && p[size - 1] < mem[1],
                   "Block outside memory pool");

-- 
Chris Morrow	YottaYotta Inc.
email:		cmorrow@yottayotta.com
phone:		(780) 439 9000 ext 227
web:		http://www.yottayotta.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]