You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile the RTI (using gcc 14), then I get the following error:
/home/cmenard/projects/lf/lingua-franca/core/src/main/resources/lib/c/reactor-c/trace/impl/src/trace_impl.c: In function ‘start_trace’:
/home/cmenard/projects/lf/lingua-franca/core/src/main/resources/lib/c/reactor-c/trace/impl/src/trace_impl.c:155:57: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
155 | trace->_lf_trace_buffer_size = (size_t*)calloc(sizeof(size_t), trace->_lf_number_of_trace_buffers + 1);
| ^~~~~~
/home/cmenard/projects/lf/lingua-franca/core/src/main/resources/lib/c/reactor-c/trace/impl/src/trace_impl.c:155:57: note: earlier argument should specify number of elements, later size of each element
Since this is a potential bug in the version of tracing that saves traces to local binary files, it is not a blocker for anything that has a specific deadline. Therefore, I am giving it low priority.
When I compile the RTI (using gcc 14), then I get the following error:
This hints at a bug in
reactor-c/trace/impl/src/trace_impl.c
Line 155 in 587a8f9
calloc
.I wanted to push a simple fix, but then I realized that there are more strange artifacts around this code. In particular:
trace->_lf_trace_buffer_size
(the pointer to the newly allocated array) incremented by one inreactor-c/trace/impl/src/trace_impl.c
Line 156 in 587a8f9
free
for this array.The text was updated successfully, but these errors were encountered: