kyleect / locks

A toy language branched from Lox to learn language implementation and tooling. Forked from loxcraft
https://kyleect.github.io/locks/#/docs
MIT License
0 stars 0 forks source link

Having more than one variant to the `Native` enum causes a segfault #131

Closed kyleect closed 9 months ago

kyleect commented 9 months ago

Currently there is only one native function: Native::Clock. If any other variant is added to that enum it segfaults. The error says the expected alignment is 0x8 but it's actually 0x3... It's different each time.

With only one varient Native is zero sized. Maybe using a string would work better? They are a sequence of bytes and will always align? This is where my knowledge/experience fails me.