Skip to content

Commit 1596968

Browse files
Test to reproduce the situation when PJ_POOL_ALIGN_PTR(block->cur, alignment) > block->end
diagnostics/2
1 parent 4a30afc commit 1596968

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pjlib/src/pjlib-test/pool.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ static int pool_alignment_test(void)
126126
* We should not be able to allocate anything with this alignment.
127127
*/
128128
ptr = pj_pool_aligned_alloc(pool, alignment, 0);
129-
pj_ansi_snprintf(msg, sizeof(msg), "alignment=%d, capacity=%u, ptr=%p, block->buf=%p, block->cur=%p, block->end=%p", alignment, capacity, ptr,pool->block_list.next->buf,pool->block_list.next->cur,pool->block_list.next->end);
129+
pj_ansi_snprintf(msg, sizeof(msg),
130+
"alignment=%d, capacity=%u, block->buf=%p, ptr==block->cur=%p, block->end=%p",
131+
alignment, capacity, pool->block_list.next->buf,pool->block_list.next->cur,pool->block_list.next->end);
130132
PJ_TEST_EQ(ptr, NULL, msg, { rc=-304; goto on_return; });
131133

132134
}

0 commit comments

Comments
 (0)