#include <unistd.h>
#include <setjmp.h>
#include <errno.h>
+#include <alloca.h>
#ifdef HAVE_MMAP
#include <sys/mman.h>
static void
xfree (void *ptr)
{
- return free (ptr);
+ free (ptr);
}
/* Use this for functions that are static while building in test mode,
interpreter->run_hook = NULL;
interpreter->push_hook = NULL;
interpreter->pop_hook = NULL;
-#endif
+#endif /* TEST */
/* Fill in pointers and default values. */
interpreter->max_stack_elements = maxp->max_stack_elements;
static struct sfnt_generic_test_args stack_overflow_test_args =
{
- (uint32_t[]) { },
+ NULL,
0,
true,
0,
static struct sfnt_generic_test_args stack_underflow_test_args =
{
- /* GCC BUG, this should be []! */
- (uint32_t []) { },
+ NULL,
0,
true,
4,
static struct sfnt_generic_test_args dup_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
5,
static struct sfnt_generic_test_args clear_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
false,
10,
static struct sfnt_generic_test_args raw_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
0,
static struct sfnt_generic_test_args fdef_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
4,
static struct sfnt_generic_test_args fdef_1_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
9,
static struct sfnt_generic_test_args endf_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
0,
static struct sfnt_generic_test_args rs_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
2,
static struct sfnt_generic_test_args debug_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
false,
3,
static struct sfnt_generic_test_args eif_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
false,
3,
static struct sfnt_generic_test_args sds_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
5,
static struct sfnt_generic_test_args round_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
true,
0,
static struct sfnt_generic_test_args sangw_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
false,
3,
static struct sfnt_generic_test_args aa_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
false,
3,
static struct sfnt_generic_test_args scantype_test_args =
{
- (uint32_t []) { },
+ NULL,
0,
false,
3,