Skip to content
Tcl Source Code Attachment Details
Login

Attachment Details

Overview

Artifact ID: d5dde281fe1047765a9f1aa62c71516f8f6becbe37d86724b9cbe8e80ddc9577
Ticket: 37108037b980ea6e705f56a9d983e05ee218dd0c
Date: 2022-08-12 23:21:56
User: jrtc27
Artifact Attached: 7b31eaf6341d5f93896be8709e8c6f8c583177a576b65d08fcf9e1899d374772
Filename:0008-Silence-harmless-warnings-on-CHERI-by-using-INT2PTR-.patch
Description:[PATCH 8/8] Silence harmless warnings on CHERI by using INT2PTR where appropriate On CHERI, pointers are implemented using unforgeable capabilities that include bounds and permissions metadata to provide fine-grained spatial and referential memory safety, as well as revocation by sweeping memory to provide heap temporal memory safety. In order to ensure round trips via (u)intptr_t preserve this metadata, (u)intptr_t are themselves represented as capabilities, not plain integers. In order to catch programming errors caused by using an integer type other than those to hold a pointer, CHERI LLVM emits a warning by default whenever a plain integer is cast directly to a pointer (except for integer constants, so that idioms like (void *)-1 continue to work), since it is likely the source of that cast should have been a (u)intptr_t instead. Three instances of this warning remain when compiling for CHERI (note that Tcl_SetHashValue internally casts to void *), all of which are harmless; silence them by using INT2PTR.
Content:
(file is 0 bytes of binary data)