summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal32/init.c
blob: 9f6c750c013f65b5d2d347b05a29ec5fe06a7d01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "../spfatal_support/spfatal.h"

/*
 * Copyright (c) 2018 embedded brains GmbH.  All rights reserved.
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#include <stdint.h>
#include <stdlib.h>

#define FATAL_ERROR_TEST_NAME       "32"
#define FATAL_ERROR_DESCRIPTION     "invalid free of heap memory"
#define FATAL_ERROR_EXPECTED_SOURCE RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
#define FATAL_ERROR_EXPECTED_ERROR  1

static void force_error(void)
{
  uintptr_t invalid = 1;
  free((void *) invalid);
}

#include "../spfatal_support/spfatalimpl.h"