+++ /dev/null
-/* CTF 1.8 */
+++ /dev/null
-/* CTF 1.8
- *
- * Architecture with 32-bit pointers, 32-bit integers, 32-bit longs.
- */
-
-typealias integer { size = 1; align = 1; signed = false; } := uint1_t;
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 63; align = 1; signed = false; } := timestamp_t;
-
-typealias integer { size = 32; align = 32; signed = false; base = 10; } := uint32_t;
-typealias integer { size = 32; align = 32; signed = false; } := void *;
-
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- uint32_t stream_id;
- };
-};
-
-stream {
- event.header := struct {
- uint1_t id;
- timestamp_t timestamp;
- };
- event.context := struct {
- uint32_t thread_id;
- uint32_t event_count;
- };
-};
-
-event {
- name = func_enter;
- id = 0;
- fields := struct {
- void *func_called;
- void *called_from;
- };
-};
-
-event {
- name = func_exit;
- id = 1;
-};
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
-
-trace {
- /* Integer out of range */
- major = 23452397856348975623897562893746589237465289374658923764598237645897234658723648579236;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-#!/bin/sh
-
-. ../../../utils/run.sh
+++ /dev/null
-Á\1füÁ*d
\ No newline at end of file
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-trace {
- test = "abc" "def";
-};
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License, version 2 only, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-CURDIR=$(dirname $0)
-UTILS_DIR=$CURDIR/../../../utils/
-
-source $UTILS_DIR/tap/tap.sh
-
-NUM_TESTS=1
-
-plan_tests $NUM_TESTS
-
-$CTF_READER_BIN $CTF_READER_OPTS $1 >/dev/null 2>&1
-
-result=$?
-
-is $result 1 $1
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: size = 0 */
-typealias integer { size = 0; align = 8; signed = false; } := uint0_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: Alignment values must be power of two. */
-typealias integer { size = 8; align = 17; signed = false; } := uint0_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: invalid byte ordering. */
-typealias integer { size = 8; align = 8; signed = false; byte_order = iroquois; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: invalid signed. */
-typealias integer { size = 8; align = 8; signed = svp; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: negative size. */
-typealias integer { size = -8; align = 8; signed = false; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: negative align. */
-typealias integer { size = 8; align = -8; signed = false; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-
-/* FAIL: size as string. */
-typealias integer { size = "8"; align = 8; signed = false; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: align as string. */
-typealias integer { size = 8; align = "8"; signed = false; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-
-/* FAIL: signed as string. */
-typealias integer { size = 8; align = 8; signed = "false"; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: name is a keyword. */
-typealias integer { size = 8; align = 8; signed = "false"; } := trace;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: missing size. */
-typealias integer { align = 8; signed = "false"; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: invalid kind. */
-typealias entier { size = 8; align = 8; signed = false; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: base as a string. */
-typealias integer { size = 8; align = 8; signed = false; base = "decimal"; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: invalid base. */
-typealias integer { size = 8; align = 8; signed = false; base = orthogonal; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: invalid encoding. */
-typealias integer { size = 8; align = 8; signed = false; encoding = true; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: encoding as a string. */
-typealias integer { size = 8; align = 8; signed = false; encoding = "ascii"; } := uint8_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-
-/* FAIL: out of range */
-enum dummy : uint8_t {
- x = 1024
-};
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: out of range */
-enum dummy : uint32_t {
- x = -1
-};
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: implicite type int, but undefined. */
-enum dummy {
- x = 1024
-};
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: type int, but undefined. */
-struct dummy {
- int xxx;
-};
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: duplicate name */
-struct dummy {
- uint32_t xxx;
- uint32_t xxx;
-};
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: duplicate name. */
-struct a {
- uint32_t xxx;
-};
-
-struct a {
- uint32_t xxx;
-};
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: duplicate name. */
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: keyword as a field. */
-struct a {
- uint32_t trace;
-};
-
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: keyword as a field. */
-struct a {
- uint32_t x;
-} align(-1);
-
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
+++ /dev/null
-/* CTF 1.8 */
-
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-
-/* FAIL: negative array. */
-typedef uint32_t name[-1];
-
-trace {
- major = 2;
- minor = 1;
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- };
-};
-
-
--- /dev/null
+#!/bin/sh
+
+for dir in */; do
+ echo "Running ${dir} tests"
+ cd ${dir}
+ ./run.sh
+ cd ..
+done
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥d
\ No newline at end of file
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-env {
- dummy = "blah";
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-
-trace {
- major = 1;
- minor = 8;
- byte_order = le;
-};
+++ /dev/null
-#!/bin/sh
-
-. ../../../utils/run.sh
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- test2 = "?\x20\040\123\0?";
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-/* use babeltrace -f trace:hostname to print. */
-
-/*
- * Expected:
-
-abc " hex: A, #, #, #1,
-oct: A, #, #, #1,
-
- */
-
-env {
- hostname = "\nabc \" hex: \x41, \x23, \x023, \x0231,\noct: \101, \043, \43, \0431, \0NOT SEEN";
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- test = 0xABC234; /* hexadecimal */
- test1 = 06534; /* octal */
- test2 = 1234; /* decimal */
- test3 = +1234; /* decimal with + unary op */
- test4 = -1234; /* decimal (negated) */
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
-};
-
-event {
- name = string;
- fields := struct { string str; };
-};
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License, version 2 only, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-CURDIR=$(dirname $0)
-UTILS_DIR=$CURDIR/../../../utils/
-
-source $UTILS_DIR/tap/tap.sh
-
-NUM_TESTS=1
-
-plan_tests $NUM_TESTS
-
-$CTF_READER_BIN $CTF_READER_OPTS $1 >/dev/null 2>&1
-
-result=$?
-
-is $result 0 $1
+++ /dev/null
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; aa = bb; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; zz = aa; } := uint32_t;
-
-trace {
- major = 0;
- minor = 1;
- uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
- byte_order = le;
- packet.header := struct {
- uint32_t magic;
- uint8_t uuid[16];
- };
- blah = "aaa";
-};
-
-stream {
- packet.context := struct {
- uint32_t content_size;
- uint32_t packet_size;
- };
- askdjfhaskdjfh = 1;
-};
-
-event {
- name = string;
- fields := struct { string str; };
- asdjfhah := struct { uint8_t ffff; };
-};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+
+typedef uint32_t array_type[10];
+
+/* FAIL: type 'array_type' is already defined */
+typedef uint64_t array_type[10];
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[x];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[typedef];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[-1];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A["x"];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Enum can be nameless */
+event {
+ name = string;
+ fields := struct {
+ uint32_t A[uint32_t];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[uint32_t];
--- /dev/null
+/* CTF 1.8 */
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+// This is not defined, thus type 'int' doesn't exists.
+// typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ /* An untyped enum is typed with "int". */
+ enum {
+ VAL1
+ } field;
+ };
+};
+
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+/* This is ugly: 'int' is defined as a 'string'. */
+typealias string { encoding = ascii; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ /* An untyped enum is typed with "int" (a string). */
+ enum {
+ VAL1
+ } field;
+ };
+};
+
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias floating_point { exp_dig = 8; mant_dig = 24; } := FLOAT;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Enum can be nameless */
+event {
+ name = string;
+ fields := struct {
+ enum Z: FLOAT { X } Y;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Enum can be nameless */
+event {
+ name = string;
+ fields := struct {
+ enum : uint8_t {
+ VAL1,
+ VAL2 = VAL1,
+ VAL3 = VAL2
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := TYPE;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Value 1024 is above the max value of TYPE. */
+event {
+ name = string;
+ fields := struct {
+ enum : TYPE {
+ VAL1,
+ VAL2,
+ VAL3 = 1024
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = true; base = hex; } := TYPE;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Value -1024 is below the min value of TYPE. */
+event {
+ name = string;
+ fields := struct {
+ enum : TYPE {
+ VAL1,
+ VAL2,
+ VAL3 = -1024
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
+
+trace {
+ /* Integer out of range */
+ major = 23452397856348975623897562893746589237465289374658923764598237645897234658723648579236;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "\0a6422d0-6cee-11e0-8c08-cb07d7b3a564"; // yes, it's a NUL char in front!
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a5642a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0x; /// This is strange [must fail].
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
--- /dev/null
+/* CTF 1.8 */
+typealias
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size =
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564;
\ No newline at end of file
--- /dev/null
+/* CTF 100000000000000000000000000000000000.8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
--- /dev/null
+/* CTF 1 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
--- /dev/null
+#!/bin/sh
+
+. ../../../../../utils/run.sh
--- /dev/null
+/* CTF 1.8 */
+
+trace {
+ test = "abc" "def";
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+enum : uint32_t {
+ X = 8
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(X);
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(0xFFFFFFFFU);
+
+struct Dummy2 {
+ uint8_t x;
+} align(0xFFFFFFFFFFFFFFFFULL);
+
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(-8);
+
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align("duh");
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(0);
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: structure 'dummy2' is not yet defined */
+struct dummy1 {
+ uint32_t field1;
+ struct dummy2 field2;
+};
+
+struct dummy2 {
+ uint32_t field3;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: structure containing itself */
+struct dummy {
+ uint32_t field1;
+ struct dummy field2;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: reserved keywords used as fields */
+struct dummy {
+ uint32_t valid;
+ uint32_t callsite;
+ uint32_t env;
+ uint32_t stream;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License, version 2 only, as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+CURDIR=$(dirname $0)
+UTILS_DIR=$CURDIR/../../../../../utils/
+
+source $UTILS_DIR/tap/tap.sh
+
+NUM_TESTS=1
+
+plan_tests $NUM_TESTS
+
+if [ "x${CTF_READER_BIN}" == "x" ]; then
+ echo "Bail out! No CTF_READER_BIN specified"
+ exit 1
+fi
+
+$CTF_READER_BIN $CTF_READER_OPTS $1 >/dev/null 2>&1
+
+result=$?
+
+is $result 1 $1
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+
+/* Fail: duplicate typedef */
+typedef uint32_t myint;
+typedef uint64_t myint;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* Fail: cannot typedef a reserved keyword */
+typedef uint32_t int;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: size = 0 */
+typealias integer { size = 0; align = 8; signed = false; } := uint0_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: Alignment values must be power of two. */
+typealias integer { size = 8; align = 17; signed = false; } := uint0_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: invalid byte ordering. */
+typealias integer { size = 8; align = 8; signed = false; byte_order = iroquois; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: invalid signed. */
+typealias integer { size = 8; align = 8; signed = svp; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: negative size. */
+typealias integer { size = -8; align = 8; signed = false; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: negative align. */
+typealias integer { size = 8; align = -8; signed = false; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+
+/* FAIL: size as string. */
+typealias integer { size = "8"; align = 8; signed = false; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: align as string. */
+typealias integer { size = 8; align = "8"; signed = false; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+
+/* FAIL: signed as string. */
+typealias integer { size = 8; align = 8; signed = "false"; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: name is a keyword. */
+typealias integer { size = 8; align = 8; signed = "false"; } := trace;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: missing size. */
+typealias integer { align = 8; signed = "false"; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: invalid kind. */
+typealias entier { size = 8; align = 8; signed = false; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: base as a string. */
+typealias integer { size = 8; align = 8; signed = false; base = "decimal"; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: invalid base. */
+typealias integer { size = 8; align = 8; signed = false; base = orthogonal; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: invalid encoding. */
+typealias integer { size = 8; align = 8; signed = false; encoding = true; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: encoding as a string. */
+typealias integer { size = 8; align = 8; signed = false; encoding = "ascii"; } := uint8_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+
+/* FAIL: out of range */
+enum dummy : uint8_t {
+ x = 1024
+};
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: out of range */
+enum dummy : uint32_t {
+ x = -1
+};
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: implicite type int, but undefined. */
+enum dummy {
+ x = 1024
+};
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: type int, but undefined. */
+struct dummy {
+ int xxx;
+};
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: duplicate name */
+struct dummy {
+ uint32_t xxx;
+ uint32_t xxx;
+};
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: duplicate name. */
+struct a {
+ uint32_t xxx;
+};
+
+struct a {
+ uint32_t xxx;
+};
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: duplicate name. */
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: keyword as a field. */
+struct a {
+ uint32_t trace;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: keyword as a field. */
+struct a {
+ uint32_t x;
+} align(-1);
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* FAIL: negative array. */
+typedef uint32_t name[-1];
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
+
+
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+enum : uint32_t { " sel1 ", " sel2 ", " sel3 " } tag;
+
+variant MyVariant<tag> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <2> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <variant> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <"tag"> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias floating_point { exp_dig = 8; mant_dig = 24; } := FLOAT;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+FLOAT tag;
+
+variant <tag> {
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias string { encoding = ascii; } := str;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+
+str tag;
+
+variant <tag> {
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[10];
+typedef uint16_t B[2];
+typedef uint8_t C[1];
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[10];
+typedef uint16_t B[2];
+typedef uint8_t C[1];
+
+typedef A X[1];
+typedef B Y[1];
+typedef C Z[1];
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[10][1];
+typedef uint16_t B[2][1];
+typedef uint8_t C[1][1];
+
+typedef A X[1][1];
+typedef B Y[1][1];
+typedef C Z[1][1];
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef uint32_t A[10][1];
+typedef uint16_t B[2][1];
+typedef uint8_t C[1][1];
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef enum : uint8_t {
+ X, Y, Z
+} MyEnum;
+
+
+typedef MyEnum MyArray[1024];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typedef struct {
+ uint32_t A[10];
+} MyStruct;
+
+
+typedef MyStruct MyArray[1024];
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ // To be specified into the standard.
+ enum {} field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Enum can be nameless */
+event {
+ name = string;
+ fields := struct {
+ enum : uint8_t {
+ VAL1, VAL2, VAL3
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Enum can be nameless */
+event {
+ name = string;
+ fields := struct {
+ enum : uint8_t {
+ "VAL1",
+ "VAL 1",
+ VAL_1
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := int;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ /* An untyped enum is typed with "int". */
+ enum {
+ VAL1
+ } field;
+ };
+};
+
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = true; base = hex; } := TYPE;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Value 127 is the max value of TYPE. */
+event {
+ name = string;
+ fields := struct {
+ enum : TYPE {
+ VAL1,
+ VAL2,
+ VAL3 = 127
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = true; base = hex; } := TYPE;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Value -128 is the min value of TYPE. */
+event {
+ name = string;
+ fields := struct {
+ enum : TYPE {
+ VAL1,
+ VAL2,
+ VAL3 = -128
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 8; align = 8; signed = true; base = 10; } := TYPE;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Negative value are allowed for signed enum. */
+event {
+ name = string;
+ fields := struct {
+ enum : TYPE {
+ VAL1,
+ VAL2,
+ VAL3 = -1
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := TYPE;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* Value 255 is the max value of TYPE. */
+event {
+ name = string;
+ fields := struct {
+ enum : TYPE {
+ VAL1,
+ VAL2,
+ VAL3 = 255
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+trace {
+ major = 1;
+ minor = 8;
+ byte_order = le;
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* The first character is an escape char and is removed. */
+/* Thus str and _str are the same field, and should fail. */
+event {
+ name = string;
+ fields := struct {
+ string str;
+ string _str;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* The first character is an escape char and is removed. */
+/* Thus the field _ will produce an empty string. */
+event {
+ name = string;
+ fields := struct {
+ string _;
+ string __;
+ string ___;
+ };
+};
--- /dev/null
+#!/bin/sh
+
+. ../../../../../utils/run.sh
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ uint8_t len;
+ uint32_t A[len];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ uint8_t len;
+ uint32_t A[len][len];
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ uint8_t len;
+ struct {
+ uint32_t A[len];
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct {
+ uint8_t len;
+ typedef struct { uint32_t A[len]; } Field;
+ struct {
+ string len;
+ Field x;
+ } field;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ test2 = "?\x20\040\123\0?";
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+/* use babeltrace -f trace:hostname to print. */
+
+/*
+ * Expected:
+
+abc " hex: A, #, #, #1,
+oct: A, #, #, #1,
+
+ */
+
+env {
+ hostname = "\nabc \" hex: \x41, \x23, \x023, \x0231,\noct: \101, \043, \43, \0431, \0NOT SEEN";
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* PASS: struct should be aligned to 16 bits (follows the specified value). */
+struct dummy {
+ uint32_t field1;
+ uint32_t field2;
+ uint32_t field3;
+} align(16);
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/*
+ * PASS: struct should be aligned to 8 bits (fields' value is larger than the
+ * one specified by the struct).
+ */
+struct dummy {
+ uint32_t field1;
+ uint32_t field2;
+ uint32_t field3;
+} align(4);
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(8);
+
+struct Dummy2 {
+ uint8_t x;
+} align(16);
+
+struct Dummy3 {
+ uint8_t x;
+} align(32);
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+struct dummy1 {
+ uint32_t field1;
+}
+
+/* PASS: Inner structure is defined earlier */
+struct dummy2 {
+ uint32_t field2;
+ struct dummy1 field3;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := int;
+
+/* PASS: unnamed struct type used as field */
+struct dummy {
+ int normal_field;
+ struct {
+ int sub_field1;
+ int sub_field2;
+ } x;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ int magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* PASS: 'field' and '_field' should be different fields */
+struct dummy {
+ uint32_t field;
+ uint32_t _field;
+ uint32_t __field;
+};
+
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ test = 0xABC234; /* hexadecimal */
+ test1 = 06534; /* octal */
+ test2 = 1234; /* decimal */
+ test3 = +1234; /* decimal with + unary op */
+ test4 = -1234; /* decimal (negated) */
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License, version 2 only, as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+CURDIR=$(dirname $0)
+UTILS_DIR=$CURDIR/../../../../../utils/
+
+source $UTILS_DIR/tap/tap.sh
+
+NUM_TESTS=1
+
+plan_tests $NUM_TESTS
+
+if [ "x${CTF_READER_BIN}" == "x" ]; then
+ echo "Bail out! No CTF_READER_BIN specified"
+ exit 1
+fi
+
+$CTF_READER_BIN $CTF_READER_OPTS $1 >/dev/null 2>&1
+
+result=$?
+
+is $result 0 $1
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* PASS: It's possible to typedef reserved keywords */
+typealias uint32_t := int;
+
+struct mystruct {
+ uint32_t field1;
+ int field2;
+};
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* PASS: straight typealias */
+typealias uint32_t := myint;
+
+struct mystruct {
+ uint32_t field1;
+ myint field2;
+};
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+/* PASS: straight typedef */
+typedef uint32_t myint;
+
+trace {
+ major = 2;
+ minor = 1;
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+env {
+ dummy = "blah";
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant<tag> {
+ uint8_t sel1;
+ uint16_t sel2;
+ uint32_t sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+ uint8_t sel1;
+ uint16_t sel2;
+ uint32_t sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+typealias enum : uint32_t { sel1, sel2, sel3 } := X;
+
+struct MyStruct {
+
+X tag;
+
+variant Y<tag> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+ struct { uint8_t _; } sel1;
+ struct { uint16_t _; } sel2;
+ struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant<tag> {
+ struct {
+ enum : uint32_t { s1, s2, s3 } tag;
+ variant<tag> {
+ uint8_t s1;
+ uint8_t s2;
+ uint8_t s3;
+ } _;
+ } sel1;
+ struct {
+ enum : uint32_t { s1, s2, s3 } tag;
+ variant<tag> {
+ uint16_t s1;
+ uint16_t s2;
+ uint16_t s3;
+ } _;
+ } sel2;
+ struct {
+ enum : uint32_t { s1, s2, s3 } tag;
+ variant<tag> {
+ uint32_t s1;
+ uint32_t s2;
+ uint32_t s3;
+ } _;
+ } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[0x10];
+ };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant<tag> {
+ struct {
+ variant<tag> {
+ uint8_t sel1;
+ uint8_t sel2;
+ uint8_t sel3;
+ } _;
+ } sel1;
+ struct {
+ variant<tag> {
+ uint16_t sel1;
+ uint16_t sel2;
+ uint16_t sel3;
+ } _;
+ } sel2;
+ struct {
+ variant<tag> {
+ uint32_t sel1;
+ uint32_t sel2;
+ uint32_t sel3;
+ } _;
+ } sel3;
+} field;
+
+};
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; aa = bb; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; zz = aa; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+ blah = "aaa";
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+ askdjfhaskdjfh = 1;
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+ asdjfhah := struct { uint8_t ffff; };
+};
--- /dev/null
+#!/bin/sh
+
+for dir in */; do
+ echo "Running ${dir} tests"
+ cd ${dir}
+ ./run.sh
+ cd ..
+done
--- /dev/null
+#!/bin/sh
+
+for dir in */; do
+ echo "Running ${dir} tests"
+ cd ${dir}
+ ./run.sh
+ cd ..
+done
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t f; struct {} align(64) s; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 32; align = 64; signed = false; base = hex; } := uint32_largealign_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_largealign_t f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t f[2]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+typealias floating_point { exp_dig = 11; mant_dig = 53; } := double;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { double f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint64_t f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint64_t len; uint32_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint8_t len; uint8_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t len; uint32_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint8_t len; uint32_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { string f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { struct { uint64_t f; } s; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; base = hex; } := uint64_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct {
+ enum : uint8_t { sel0 = 0, sel1 = 1, sel2 = 2, } mytag;
+ variant <mytag> {
+ uint8_t sel0[300];
+ uint8_t sel1[200];
+ uint8_t sel2[7];
+ } v;
+ };
+};
--- /dev/null
+/* CTF 1.8
+ *
+ * Architecture with 32-bit pointers, 32-bit integers, 32-bit longs.
+ */
+
+typealias integer { size = 1; align = 1; signed = false; } := uint1_t;
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 63; align = 1; signed = false; } := timestamp_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = 10; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = false; } := void *;
+
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ uint32_t stream_id;
+ };
+};
+
+stream {
+ event.header := struct {
+ uint1_t id;
+ timestamp_t timestamp;
+ };
+ event.context := struct {
+ uint32_t thread_id;
+ uint32_t event_count;
+ };
+};
+
+event {
+ name = func_enter;
+ id = 0;
+ fields := struct {
+ void *func_called;
+ void *called_from;
+ };
+};
+
+event {
+ name = func_exit;
+ id = 1;
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 512; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { struct {} align(512) s; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 512; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t blah; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dBBBB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t blah[2]; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias floating_point { exp_dig = 8; mant_dig = 24; align = 32; } := float;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { float blah; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t blah; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t len; uint32_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t len; uint32_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t len; uint32_t blah[len]; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t len; uint32_t blah[len]; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { string blah; };
+};
--- /dev/null
+Á\1füÁ*d
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct { struct { uint32_t blah; } s; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = hex; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct {
+ enum : uint8_t { sel0 = 0, sel1 = 1, sel2 = 2, } mytag;
+ variant <mytag> {
+ uint8_t sel0[300];
+ uint8_t sel1[200];
+ uint8_t sel2;
+ } v;
+ };
+};
--- /dev/null
+Á\1füÁ*d
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t packet_size;
+ uint32_t content_size;
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct { uint32_t f; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥d
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 512; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { struct {} s; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥d
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 512; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { struct {} align(2) s; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥d
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 512; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { struct {} s; };
+};
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥d\ 2B
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = hex; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = myevent;
+ fields := struct {
+ enum : uint8_t { sel0 = 0, sel1 = 1, sel2 = 2, } mytag;
+ variant <mytag> {
+ uint8_t sel0[300];
+ uint8_t sel1[200];
+ uint8_t sel2;
+ } v;
+ };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+stream {
+ packet.context := struct {
+ uint32_t content_size;
+ uint32_t packet_size;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+#!/bin/sh
+
+for dir in */; do
+ echo "Running ${dir} tests"
+ cd ${dir}
+ ./run.sh
+ cd ..
+done
#!/bin/sh
-echo "Running expected pass tests"
-cd pass
-./run.sh
-cd ..
-
-echo "Running expected failure tests"
-cd fail
-./run.sh
-cd ,,
+for dir in */; do
+ echo "Running ${dir} tests"
+ cd ${dir}
+ ./run.sh
+ cd ..
+done
--- /dev/null
+#!/bin/sh
+
+for dir in */; do
+ echo "Running ${dir} tests"
+ cd ${dir}
+ ./run.sh
+ cd ..
+done
--- /dev/null
+Á\1füÁ*d"Ðlî\11à\8c\bË\a׳¥dBBBB
\ No newline at end of file
--- /dev/null
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint32_t magic;
+ uint8_t uuid[16];
+ };
+};
+
+event {
+ name = evname;
+ fields := struct { uint32_t len; uint32_t blah[len]; };
+};
echo "Running expected failure tests"
cd fail
./run.sh
-cd ,,
+cd ..