Skip to content

offset intrinsic doesn't check that pointers stay within bounds #1233

@adpaco-aws

Description

@adpaco-aws

The documentation for the offset method mentions in the safety conditions that:

Both the starting and resulting pointer must be either in bounds or one byte past the end of the same allocated object.

At present, the standard library prevents us from adding this check because otherwise we run into spurious failures (i.e., offsets that go out-of-bounds, are frequently used).

Metadata

Metadata

Labels

[C] BugThis is a bug. Something isn't working.[F] SoundnessKani failed to detect an issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions