Commit 6962d33b authored by Jolien Creighton's avatar Jolien Creighton

remove double-free test

Original: f958f7001079afd8355a0203b0b52a78737d3078
parent 54abbaa1
......@@ -210,10 +210,12 @@ static int testPadding( void )
// trial( LALFree( NULL ), SIGSEGV, "error: tried to free NULL pointer" );
/* double free */
trial( p = LALMalloc( 2 * sizeof( *p ) ), 0, "" );
trial( LALFree( p ), 0, "" );
trial( LALFree( p ), SIGSEGV, "error: tried to free a freed pointer" );
trial( LALCheckMemoryLeaks(), 0, "" );
/* actually, this cannot be done robustly -- system can change values
* in unallocated space at will */
//trial( p = LALMalloc( 2 * sizeof( *p ) ), 0, "" );
//trial( LALFree( p ), 0, "" );
//trial( LALFree( p ), SIGSEGV, "error: tried to free a freed pointer" );
//trial( LALCheckMemoryLeaks(), 0, "" );
/* wrong magic */
trial( p = LALMalloc( 2 * sizeof( *p ) ), 0, "" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment