-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Describe the bug
The program throws a segmentation fault on default exit.
To Reproduce
Paste the reproduction code snippet below:
#include "co_ecs.hpp"
struct s1 {
uint32_t i1;
uint64_t i2;
};
struct s2 {
float f1;
int i1;
};
struct s3 {
char c, e;
};
void test_create(ecs::registry& reg) {
auto a = reg.create<s1, s3>({1, 2}, {92, 93});
auto b = reg.create<s1, s3>({7, 3}, {75, 76});
auto c = reg.create<s2>({});
}
int main() {
ecs::registry reg;
test_create(reg);
return 0;
}Observed behavior
The segfault is caused by the destructor call inside the destructor of the chunk class. Specifically this line:
block.meta.type->destruct(_buffer + block.offset + i * block.meta.type->size);Environment
- OS: MacOS 13.1
- Arch: arm64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels