NAME=ELF: UBSAN+ASAN
FILE=bins/elf/sanitizer/asan.elf
CMDS=<<EOF
iI
iIj~{}
EOF
EXPECT=<<EOF
arch           x86
cpu            N/A
features       N/A
baddr          0x00000000
binsz          0x001c9bc8
bintype        elf
bits           64
class          ELF64
compiler       GCC: (GNU) 15.2.1 20260209 clang version 22.1.3
dbg_file       N/A
endian         LE
hdr.csum       N/A
guid           N/A
intrp          /lib64/ld-linux-x86-64.so.2
laddr          0x00000000
lang           c++
machine        AMD x86-64 architecture
maxopsz        16
minopsz        1
os             linux
cc             N/A
pcalign        1
relro          partial
rpath          NONE
subsys         linux
stripped       true
havecode       true
va             true
static         false
linenum        false
lsyms          false
canary         false
pie            true
relrocs        false
nx             true
fortify_source true
sanitizers     ubsan,asan
{
  "arch": "x86",
  "baddr": 0,
  "binsz": 1874888,
  "bintype": "elf",
  "bits": 64,
  "class": "ELF64",
  "compiler": "GCC: (GNU) 15.2.1 20260209 clang version 22.1.3",
  "endian": "LE",
  "intrp": "/lib64/ld-linux-x86-64.so.2",
  "laddr": 0,
  "lang": "c++",
  "machine": "AMD x86-64 architecture",
  "maxopsz": 16,
  "minopsz": 1,
  "os": "linux",
  "pcalign": 1,
  "relro": "partial",
  "rpath": "NONE",
  "subsys": "linux",
  "stripped": true,
  "havecode": true,
  "va": true,
  "static": false,
  "linenum": false,
  "lsyms": false,
  "canary": false,
  "pie": true,
  "relrocs": false,
  "nx": true,
  "fortify_source": true,
  "sanitizers": [
    "ubsan",
    "asan"
  ]
}
EOF
RUN

NAME=ELF: UBSAN+TSAN
FILE=bins/elf/sanitizer/tsan.elf
CMDS=<<EOF
iI
iIj~{}
EOF
EXPECT=<<EOF
arch           x86
cpu            N/A
features       N/A
baddr          0x00000000
binsz          0x0014ebb0
bintype        elf
bits           64
class          ELF64
compiler       GCC: (GNU) 15.2.1 20260209 clang version 22.1.3
dbg_file       N/A
endian         LE
hdr.csum       N/A
guid           N/A
intrp          /lib64/ld-linux-x86-64.so.2
laddr          0x00000000
lang           c
machine        AMD x86-64 architecture
maxopsz        16
minopsz        1
os             linux
cc             N/A
pcalign        1
relro          partial
rpath          NONE
subsys         linux
stripped       true
havecode       true
va             true
static         false
linenum        false
lsyms          false
canary         true
pie            true
relrocs        false
nx             true
fortify_source true
sanitizers     ubsan,tsan
{
  "arch": "x86",
  "baddr": 0,
  "binsz": 1371056,
  "bintype": "elf",
  "bits": 64,
  "class": "ELF64",
  "compiler": "GCC: (GNU) 15.2.1 20260209 clang version 22.1.3",
  "endian": "LE",
  "intrp": "/lib64/ld-linux-x86-64.so.2",
  "laddr": 0,
  "lang": "c",
  "machine": "AMD x86-64 architecture",
  "maxopsz": 16,
  "minopsz": 1,
  "os": "linux",
  "pcalign": 1,
  "relro": "partial",
  "rpath": "NONE",
  "subsys": "linux",
  "stripped": true,
  "havecode": true,
  "va": true,
  "static": false,
  "linenum": false,
  "lsyms": false,
  "canary": true,
  "pie": true,
  "relrocs": false,
  "nx": true,
  "fortify_source": true,
  "sanitizers": [
    "ubsan",
    "tsan"
  ]
}
EOF
RUN

NAME=ELF: UBSAN+MSAN
FILE=bins/elf/sanitizer/msan.elf
CMDS=<<EOF
iI
iIj~{}
EOF
EXPECT=<<EOF
arch           x86
cpu            N/A
features       N/A
baddr          0x00000000
binsz          0x0010cbaf
bintype        elf
bits           64
class          ELF64
compiler       GCC: (GNU) 15.2.1 20260209 clang version 22.1.3
dbg_file       N/A
endian         LE
hdr.csum       N/A
guid           N/A
intrp          /lib64/ld-linux-x86-64.so.2
laddr          0x00000000
lang           c++
machine        AMD x86-64 architecture
maxopsz        16
minopsz        1
os             linux
cc             N/A
pcalign        1
relro          partial
rpath          NONE
subsys         linux
stripped       true
havecode       true
va             true
static         false
linenum        false
lsyms          false
canary         false
pie            true
relrocs        false
nx             true
fortify_source true
sanitizers     ubsan,msan
{
  "arch": "x86",
  "baddr": 0,
  "binsz": 1100719,
  "bintype": "elf",
  "bits": 64,
  "class": "ELF64",
  "compiler": "GCC: (GNU) 15.2.1 20260209 clang version 22.1.3",
  "endian": "LE",
  "intrp": "/lib64/ld-linux-x86-64.so.2",
  "laddr": 0,
  "lang": "c++",
  "machine": "AMD x86-64 architecture",
  "maxopsz": 16,
  "minopsz": 1,
  "os": "linux",
  "pcalign": 1,
  "relro": "partial",
  "rpath": "NONE",
  "subsys": "linux",
  "stripped": true,
  "havecode": true,
  "va": true,
  "static": false,
  "linenum": false,
  "lsyms": false,
  "canary": false,
  "pie": true,
  "relrocs": false,
  "nx": true,
  "fortify_source": true,
  "sanitizers": [
    "ubsan",
    "msan"
  ]
}
EOF
RUN
