From a3d38d01d893f30a08aba5f757e0d01cabf852cb Mon Sep 17 00:00:00 2001 From: =jkaberuka365 <=> Date: Fri, 29 Sep 2023 15:01:48 +0200 Subject: [PATCH 1/3] Add buildsuccess.txt file --- buildsuccess.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 buildsuccess.txt diff --git a/buildsuccess.txt b/buildsuccess.txt new file mode 100644 index 0000000..68ae9cb --- /dev/null +++ b/buildsuccess.txt @@ -0,0 +1,9 @@ +1. Following the README file, when adapting the build configuration, the file cheribuild.json can be configured at ~/.config/cheribuild.json + +2. However, during my build with this file, unhandled exceptions has been issues time and time and prevented a successful build process + +3. I had to remove this file from ~/ directory and also from cheribuild cloned directory + +4. Removing the same file from both locations, python3 cheribuild.py run-morello-purecap completed successfully + + From 59bf987daf759a0a8cdc946085dbfad7761c3ee2 Mon Sep 17 00:00:00 2001 From: =jkaberuka365 <=> Date: Fri, 29 Sep 2023 15:17:22 +0200 Subject: [PATCH 2/3] PrintCapabilityValue --- PrintCapabilityValue.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 PrintCapabilityValue.c diff --git a/PrintCapabilityValue.c b/PrintCapabilityValue.c new file mode 100644 index 0000000..3941cc2 --- /dev/null +++ b/PrintCapabilityValue.c @@ -0,0 +1,23 @@ +/* + + How do I printf a capability value + we use calloc() and still producing same results + However, the memory allocation with calloc() will be initialized to zero + + by Joseph Kaberuka +*/ + +#include +#include + +int main() { + +void *x =(void *)calloc(1, 1); +printf("The address in this capability is %p\n", x); +printf("The full capability (incl metadata) is %#p\n", x); +// Freeing the allocated memory +free(x); + +return 0; + +} From e3365418f6ffb87ae5508b76a561a89ed3089040 Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 29 Sep 2023 15:31:02 +0200 Subject: [PATCH 3/3] Provenanceissue.c file --- provenanceissue.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 provenanceissue.c diff --git a/provenanceissue.c b/provenanceissue.c new file mode 100644 index 0000000..29222d9 --- /dev/null +++ b/provenanceissue.c @@ -0,0 +1,26 @@ +#include + +void myFunction(int *ptr){ +//trying to perform some operations with ptr + +} + +int main() { + +int array_data[5]={1,2,3,4,5}; + +int *ptr1 =array_data; + +//pass ptr to myFunction + +myFunction(ptr1); + +//attempt to access 'array_data' through 'ptr1' again + +int myValue =*ptr1; + +printf("myvalue : %d\n", myValue); + +return 0; + +}