alexcrichton commented on Issue #2449:
I'm not 100% familiar with our codegen, but for prologue generation does this also need to hook into
Operator::Return
?
cfallin commented on Issue #2449:
Yep, one needs to hook prior to returns to catch all exits (i.e. not just fallthroughs in void-returning functions), but for simplicity/orthogonality I opted to let the embedder handle that separately (e.g. in my Lucet patch here) -- these hooks are "before/after in the static layout sense". Actually I had originally been hoping the existing hooks would be enough, but the function-with-fallthrough-return case was what motivated this patch :-)
cfallin edited a comment on Issue #2449:
Yep, one needs to hook prior to returns to catch all exits (i.e. not just fallthroughs in void-returning functions), but for simplicity/orthogonality I opted to let the embedder handle that separately (e.g. in my Lucet patch here) -- these hooks are "before/after in the static layout sense". Actually I had originally been hoping the existing hooks would be enough, but the function-with-fallthrough-return case was what motivated this patch :-)
Last updated: Dec 23 2024 at 12:05 UTC