asprintf and some stubs