// S : tags error c oom vararg $TAGS // S : expect --result error --location-comment ERROR // S : cc -o test.bc $CC_OPT $file // S : verify $V_OPT test.bc #include #include #include #include #include int call_vasprintf( char **out, const char *fmt, ... ) { int rc; va_list ap; va_start( ap, fmt ); return vasprintf( out, fmt, ap ); va_end( ap ); return rc; } int main( void ) { char *buf = NULL; int r = call_vasprintf( &buf, "test" ); assert( r == 4 ); /* ERROR */ if ( r ) free( buf ); return 0; }