Skip to content

Fix C++17 object lifetime handling in type-erasure storage #6

Description

@vshalygin

This issue was identified during a Codex code review.

cl::function and the external-storage branch of value_proxy write pointer objects into std::byte buffers through reinterpret_cast without explicitly starting the lifetime of those pointer objects.

Although this works with the currently supported compilers, it is not formally well-defined under the project's minimum C++17 standard.

Use placement new and proper typed access, or replace the raw byte-storage representation with an explicitly managed pointer/union representation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions