lf-lang / lf-python-support

Python package for supporting code generated by the Lingua Franca compiler
Other
5 stars 0 forks source link

Segmentation fault error during federated execution caused by multiport #25

Closed jackyk02 closed 1 year ago

jackyk02 commented 1 year ago

This pull request addresses the issue found in the convert_C_port_to_py function. The problem occurs when handling generic_port_instance_struct* cport for multiport instances. Currently, this structure is not properly assigned when dealing with multiport instances, which leads to subsequent issues in the function. On line 433, we see the macro FEDERATED_ASSIGN_FIELDS(((generic_port_capsule_struct*)cap), cport), which relies on cport. In the case of multiport, if cport isn't appropriately assigned, this macro won't function correctly, causing segmentation fault.

lhstrh commented 1 year ago

@petervdonovan, if you could implement your suggested change and file a PR in reactor-c, that would be great!

petervdonovan commented 1 year ago

Closing as replaced by https://github.com/lf-lang/reactor-c/pull/218