• Nils Goroll's avatar
    Fix assertion on region vs object liveliness during log read · a3075023
    Nils Goroll authored
    This concerns an open issue from before the public release, which I
    had not understood before and believe to have understood now.
    
    With this code *) added to the test
    
    @@ -5946,6 +5949,15 @@ t_cache(unsigned chksum)
    	test_bocdone(fbo, TRUST_ME(hash), 1);
    	fellow_cache_obj_deref(fc, fco);
    
    +	// === max out region alloc
    +	fbo = fellow_busy_obj_alloc(fc, &fco, &priv2, 1234).r.ptr;
    +	CHECK_OBJ_NOTNULL(fbo, FELLOW_BUSY_MAGIC);
    +	for (u = 0; u < FCO_MAX_REGIONS; u++)
    +		AN(fellow_busy_region_alloc(fbo, 1234, INT8_MAX));
    +
    +	test_bocdone(fbo, TRUST_ME(hash), 1);
    +	fellow_cache_obj_delete(fc, fco, hash);
    +
    	// === alloc space, dont use
    
    we tripped here
    
       assert(flivs->oob || u == obj_alive);
    
    with u == 1 and obj_alive == 0.
    
    So the offset of a region from a dead object was not taken by a
    subsequent allocation, which is fine, why should it be?
    
    *) Note: The added test code is not correct yet, as it does not
       register the regions with the segment list, so obj_delete leaks.
    a3075023
Name
Last commit
Last update
LICENSES Loading commit data...
logs Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
BUGS.rst Loading commit data...
CHANGES.rst Loading commit data...
COPYING Loading commit data...
INSTALL.rst Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...