Example: intr0.c

up: index
prev: eq5.c
next: intr1.c

    #include <inttypes.h>
    #include <cheriintrin.h>
    #include <stdio.h>
    #include "capprint.h"
    
    int main()
    {
        int v = 42;
        int *x = &v;
        fprintf(stderr,"Original: %" PTR_FMT "\n", sptr((void*)x));
        int *y = cheri_perms_and(x, 0l); 
        fprintf(stderr,"Modified: %" PTR_FMT "\n", sptr((void*)y));
    }

Experimental data (what does this mean?)

cerberus-cheri-no-pnvi
cerberus-cheri-revocation-no-pnvi
cerberus-cheri-cornucopia-no-pnvi
 Original: (@disabled, 0xffffe720 [rwRW,0xffffe720-0xffffe724])
Modified: (@disabled, 0xffffe720 [,0xffffe720-0xffffe724])
 
cerberus-cheri
cerberus-cheri-revocation
cerberus-cheri-cornucopia
 Original: (@81, 0xffffe720 [rwRW,0xffffe720-0xffffe724])
Modified: (@81, 0xffffe720 [,0xffffe720-0xffffe724])
 
clang-riscv-O3-bounds-conservative
clang-riscv-O3-bounds-subobject-safe
 Original: 0x3fffdfff2c [rwRW,0x3fffdfff2c-0x3fffdfff30]
Modified: 0x3fffdfff2c [,0x3fffdfff2c-0x3fffdfff30]
 
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: 0x3fffdfff6c [rwRW,0x3fffdfff6c-0x3fffdfff70]
Modified: 0x3fffdfff6c [,0x3fffdfff6c-0x3fffdfff70]
 
clang-morello-O3-bounds-subobject-safe Original: 0xfffffff7fefc [rwRW,0xfffffff7fefc-0xfffffff7ff00]
Modified: 0xfffffff7fefc [,0xfffffff7fefc-0xfffffff7ff00]
 
clang-morello-O3-bounds-conservative Original: 0xfffffff7ff1c [rwRW,0xfffffff7ff1c-0xfffffff7ff20]
Modified: 0xfffffff7ff1c [,0xfffffff7ff1c-0xfffffff7ff20]
 
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: 0xfffffff7ff5c [rwRW,0xfffffff7ff5c-0xfffffff7ff60]
Modified: 0xfffffff7ff5c [,0xfffffff7ff5c-0xfffffff7ff60]
 
gcc-morello-O3 Original: 0x7fffffdc [rwRW,0x7fffffdc-0x7fffffe0]
Modified: 0x7fffffdc [,0x7fffffdc-0x7fffffe0]
 
gcc-morello-O0 Original: 0x7fffffbc [rwRW,0x7fffffbc-0x7fffffc0]
Modified: 0x7fffffbc [,0x7fffffbc-0x7fffffc0]