Skip to content

Optional field causes crash in caf::optional_inspector_access #1427

@Masrepus

Description

@Masrepus

Stacktrace from the actual crash we saw (in this case ASAN caught a stack overflow and the stack trace repeats itself endlessly, but it will also just segfault without sanitizers), but a minimal example that should cause the same behavior is this:

struct Example {
    std::optional<uint64_t> field;
}

template<typename Inspector>
bool inspect(Inspector& ins, Example& msg) {
    return ins.object(msg).fields(ins.field("field", msg.field).fallback(std::nullopt));
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions