Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Test subscripting/dereferencing operations on literals #318

Closed
@secure-sw-dev-bot

Description

@secure-sw-dev-bot

This issue was copied from checkedc/checkedc#318


Add runtime tests of subscripting/dereferencing string literals and compound literals. Examples of that are code like "abcdef"[index], *("abcdef" + index). These are one of the last few cases where we weren't inserting runtime bounds checking required by the Checked C semantics.

This matches the Checked C clang compiler PR checkedc/checkedc-clang#561.

Most of the changes are for adding arguments to test invocations for the new cases.

Fix an error where tests that check dereferencing the result of pointer arithmetic weren't actually checking that. We needed to add -DPOINTER_ARITHMETIC to the command line. We have tests that come two variations: checking subscripting, or checking subscripting expanded into a dereference operation and pointer arithmetic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions