Closed
Description
How to reproduce:
$ lpython symbolics_14.py --show-c
[...]
// Implementations
void mmrv(void* x, struct list_CPtr *_lpython_return_variable)
{
struct list_CPtr l1;
struct list_CPtr constname0;
list_init_CPtr(&constname0, 1);
constname0.data[0] = x;
constname0.current_end_point = 1;
list_deepcopy_CPtr(&constname0, &l1);
list_deepcopy_CPtr(&l1, _lpython_return_variable);
}
The line constname0.data[0] = x;
is incorrect, instead it should be basic_assign(constname0.data[0], x);
.
The current code thus contains dangling points, so it might or might not segfault.