Skip to content

lola: Initialize method InArgs and Return values on creation#283

Open
bemerybmw wants to merge 4 commits intomainfrom
brem_initialize_method_in_args
Open

lola: Initialize method InArgs and Return values on creation#283
bemerybmw wants to merge 4 commits intomainfrom
brem_initialize_method_in_args

Conversation

@bemerybmw
Copy link
Copy Markdown
Contributor

Previously, we were creating the type erased buffer for the InArgs and
Return values and then reinterpreting the buffer as InArgs / Return
values. This is UB and also means that non-trivially default
constructible types were not properly initialized. We now explicitly
call the constructors of each of these args.

@bemerybmw bemerybmw force-pushed the brem_initialize_method_in_args branch from 7432a3b to 1f669d5 Compare April 10, 2026 07:30
The binding dependent level allocates the type erased memory buffers on
construction. These calls are not actually allocating anything but
rather just returning pointers into the memory buffers. The binding
independent layer is reponsible for keeping track of which in arg /
return value can be accessed. Therefore, we rename these functions to
better reflect what they're doing.
Previously, we were creating the type erased buffer for the InArgs and
Return values and then reinterpreting the buffer as InArgs / Return
values. This is UB and also means that non-trivially default
constructible types were not properly initialized. We now explicitly
call the constructors of each of these args.
@bemerybmw bemerybmw force-pushed the brem_initialize_method_in_args branch from 1f669d5 to c70b44f Compare April 10, 2026 11:57
@bemerybmw bemerybmw marked this pull request as ready for review April 10, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant