blob: 94a1bd368d7bc2d5f128ad9a6a8ca8fa76882e33 [file] [log] [blame]
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-- Relatively complex structure intended for use in fuzz testing.
--
-- Note that field names are intentionally very short; this helps American
-- Fuzzy Lop (go/afl) find new code paths more quickly.
[$default byte_order: "LittleEndian"]
[(cpp) namespace: "emboss_test"]
bits RegisterLayout:
0 [+8] Int x
0 [+4] UInt l
4 [+4] UInt h
struct ArrayElement:
0 [+1] RegisterLayout a
struct Complex:
0 [+1] UInt s
1 [+8] UInt u
1 [+8] Int i
1 [+8] Bcd b
1 [+s*4] ArrayElement[4][] a
1 [+1] bits:
0 [+8] UInt a0
7 [+1] Flag s0
0 [+4] Int l0
4 [+4] Int h0
2 [+1] ArrayElement e1
if a0 >= 0x80:
3 [+1] ArrayElement e2
if a0 < 0x80:
3 [+1] Bcd b2
if b2 > 25:
4 [+1] Int e3
if s >= 4 && (a0 >= 80 ? e3 >= 0x80 : b2 < 50):
5 [+1] Int e4
if s >= 5 && e4 > 0:
6 [+1] Int e5
if s < 2 || a0 < 4:
1 [+1] Int e0