arr1.c
up: index
prev: ptraddr1.c
next: arr2.c
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include "capprint.h"
int main()
{
int arr[] = {42,43};
int *p = arr;
fprintf(stderr, "Original:\t%" PTR_FMT "\n", sptr((void*)p));
p++;
fprintf(stderr, "Modified:\t%" PTR_FMT "\n", sptr((void*)p));
fprintf(stderr,"Value %d\n", *p);
}
Experimental data (what does this mean?)
cerberus-cheri-no-pnvi
cerberus-cheri-revocation-no-pnvi
cerberus-cheri-cornucopia-no-pnvi Original: (@disabled, 0xffffe6fc [rwRW,0xffffe6fc-0xffffe704])
Modified: (@disabled, 0xffffe700 [rwRW,0xffffe6fc-0xffffe704])
Value 43
cerberus-cheri
cerberus-cheri-revocation
cerberus-cheri-cornucopia Original: (@82, 0xffffe6fc [rwRW,0xffffe6fc-0xffffe704])
Modified: (@82, 0xffffe700 [rwRW,0xffffe6fc-0xffffe704])
Value 43
clang-riscv-O3-bounds-conservative
clang-riscv-O3-bounds-subobject-safe Original: 0x3fffdfff28 [rwRW,0x3fffdfff28-0x3fffdfff30]
Modified: 0x3fffdfff2c [rwRW,0x3fffdfff28-0x3fffdfff30]
Value 43
clang-riscv-O0-bounds-conservative
clang-riscv-O0-bounds-references-only
clang-riscv-O0-bounds-subobject-safe
clang-riscv-O0-bounds-aggressive
clang-riscv-O0-bounds-very-aggressive
clang-riscv-O0-bounds-everywhere-unsafe Original: 0x3fffdfff68 [rwRW,0x3fffdfff68-0x3fffdfff70]
Modified: 0x3fffdfff6c [rwRW,0x3fffdfff68-0x3fffdfff70]
Value 43
clang-morello-O3-bounds-subobject-safe Original: 0xfffffff7fef8 [rwRW,0xfffffff7fef8-0xfffffff7ff00]
Modified: 0xfffffff7fefc [rwRW,0xfffffff7fef8-0xfffffff7ff00]
Value 43
clang-morello-O3-bounds-conservative Original: 0xfffffff7ff18 [rwRW,0xfffffff7ff18-0xfffffff7ff20]
Modified: 0xfffffff7ff1c [rwRW,0xfffffff7ff18-0xfffffff7ff20]
Value 43
clang-morello-O0-bounds-conservative
clang-morello-O0-bounds-references-only
clang-morello-O0-bounds-subobject-safe
clang-morello-O0-bounds-aggressive
clang-morello-O0-bounds-very-aggressive
clang-morello-O0-bounds-everywhere-unsafe Original: 0xfffffff7ff58 [rwRW,0xfffffff7ff58-0xfffffff7ff60]
Modified: 0xfffffff7ff5c [rwRW,0xfffffff7ff58-0xfffffff7ff60]
Value 43
gcc-morello-O3 Original: 0x7fffffd8 [rwRW,0x7fffffd8-0x7fffffe0]
Modified: 0x7fffffdc [rwRW,0x7fffffd8-0x7fffffe0]
Value 43
gcc-morello-O0 Original: 0x7fffffc8 [rwRW,0x7fffffc8-0x7fffffd0]
Modified: 0x7fffffcc [rwRW,0x7fffffc8-0x7fffffd0]
Value 43