Example: prov1.c

up: index
prev: prov0.c
next: prov2.c

    #include <stdint.h>
    #include <inttypes.h>
    #include <stdio.h>
    #include "capprint.h"
    
    int main()
    {
        int x0=0;
        int x1=0;
        
        int *p0 = &x0;
        int *p1 = &x1;
        
        fprintf(stderr,"p0: %" PTR_FMT "\n", sptr((void*)p0));
        fprintf(stderr,"p1: %" PTR_FMT "\n", sptr((void*)p1));
        fprintf(stderr,"p0 < p1 is %s\n",p0<p1?"true":"false");
    }

Experimental data (what does this mean?)

cerberus-cheri-no-pnvi
cerberus-cheri-revocation-no-pnvi
cerberus-cheri-cornucopia-no-pnvi
 exit codes: compile 0 / execute 1 Undefined {ub: "UB053_distinct_aggregate_union_pointer_comparison", loc: "<16:40--16:45>"}
p0: (@disabled, 0xffffe700 [rwRW,0xffffe700-0xffffe704])
p1: (@disabled, 0xffffe6fc [rwRW,0xffffe6fc-0xffffe700])
 
cerberus-cheri
cerberus-cheri-revocation
cerberus-cheri-cornucopia
 exit codes: compile 0 / execute 1 Undefined {ub: "UB053_distinct_aggregate_union_pointer_comparison", loc: "<16:40--16:45>"}
p0: (@84, 0xffffe700 [rwRW,0xffffe700-0xffffe704])
p1: (@85, 0xffffe6fc [rwRW,0xffffe6fc-0xffffe700])
 
clang-riscv-O3-bounds-subobject-safe p0: 0x3fffdfff1c [rwRW,0x3fffdfff1c-0x3fffdfff20]
p1: 0x3fffdfff18 [rwRW,0x3fffdfff18-0x3fffdfff1c]
p0 < p1 is false
 
clang-riscv-O3-bounds-conservative p0: 0x3fffdfff3c [rwRW,0x3fffdfff3c-0x3fffdfff40]
p1: 0x3fffdfff38 [rwRW,0x3fffdfff38-0x3fffdfff3c]
p0 < p1 is false
 
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
 p0: 0x3fffdfff6c [rwRW,0x3fffdfff6c-0x3fffdfff70]
p1: 0x3fffdfff68 [rwRW,0x3fffdfff68-0x3fffdfff6c]
p0 < p1 is false
 
clang-morello-O3-bounds-subobject-safe p0: 0xfffffff7feec [rwRW,0xfffffff7feec-0xfffffff7fef0]
p1: 0xfffffff7fee8 [rwRW,0xfffffff7fee8-0xfffffff7feec]
p0 < p1 is false
 
clang-morello-O3-bounds-conservative p0: 0xfffffff7ff2c [rwRW,0xfffffff7ff2c-0xfffffff7ff30]
p1: 0xfffffff7ff28 [rwRW,0xfffffff7ff28-0xfffffff7ff2c]
p0 < p1 is false
 
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
 p0: 0xfffffff7ff5c [rwRW,0xfffffff7ff5c-0xfffffff7ff60]
p1: 0xfffffff7ff58 [rwRW,0xfffffff7ff58-0xfffffff7ff5c]
p0 < p1 is false
 
gcc-morello-O3 p0: 0x7fffffd8 [rwRW,0x7fffffd8-0x7fffffdc]
p1: 0x7fffffdc [rwRW,0x7fffffdc-0x7fffffe0]
p0 < p1 is true
 
gcc-morello-O0 p0: 0x7fffffbc [rwRW,0x7fffffbc-0x7fffffc0]
p1: 0x7fffffb8 [rwRW,0x7fffffb8-0x7fffffbc]
p0 < p1 is false