Skip to content

Conversation

@Lunderberg
Copy link
Contributor

Prior to this commit, the static method relax::Function::CreateEmpty returned a function with a nullptr as the body. While only intended for use in bookkeeping for TVMScript, allowing nullptr in this location can cause unexpected segfaults while debugging. For example, adding a print statement

This commit updates the relax::Function::CreateEmpty function to contain a placeholder body, consistent with the ret_struct_info argument provided.

Prior to this commit, the static method `relax::Function::CreateEmpty`
returned a function with a nullptr as the body.  While only intended for use in
bookkeeping for TVMScript, allowing nullptr in this location can cause
unexpected segfaults while debugging.  For example, adding a print
statement

This commit updates the `relax::Function::CreateEmpty` function to
contain a placeholder body, consistent with the `ret_struct_info`
argument provided.
@vinx13 vinx13 merged commit 94a44d7 into apache:main Apr 16, 2024
@Lunderberg Lunderberg deleted the relax_qol_well_formed_ir_from_function_create_empty branch April 17, 2024 15:59
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.

2 participants