Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mycpp/examples use heap-allocated Tuple and crash #1206

Closed
andychu opened this issue Jul 6, 2022 · 6 comments
Closed

mycpp/examples use heap-allocated Tuple and crash #1206

andychu opened this issue Jul 6, 2022 · 6 comments

Comments

@andychu
Copy link
Contributor

andychu commented Jul 6, 2022

But it doesn't have a GC header! (which should be OBJ_HEADER() or gc_heap::Obj)

@andychu
Copy link
Contributor Author

andychu commented Jul 6, 2022

Questions: Does bin/osh_eval use heap-allocated tuples? Yes probably.

Solutions:

  1. Rewrite tuples to ASDL records.
  2. Support heap-allocated tuples with records

@scallyw4g
Copy link
Contributor

Yeah osh_eval definitely allocates lists of tuples.

@andychu andychu changed the title mycpp/examples/tuple_return_value uses heap-allocated Tuple and crashes mycpp/examples use heap-allocated Tuple and crash Jul 15, 2022
@andychu
Copy link
Contributor Author

andychu commented Jul 15, 2022

There are several that do this:

  • examples/tuple_return_value
  • examples/test_cast
  • examples/loops uses a heap-allocated list of tuples

@andychu
Copy link
Contributor Author

andychu commented Jul 20, 2022

We use heap-allocated tuples in cpp/leaky_frontend_match.h as well :-/

@andychu
Copy link
Contributor Author

andychu commented Oct 2, 2022

22096e5

@andychu
Copy link
Contributor Author

andychu commented Oct 23, 2022

@andychu andychu closed this as completed Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants