Skip to content

If the DSL defines a task_snprintf function, use that function.#603

Merged
therault merged 1 commit intoICLDisco:masterfrom
therault:hotfix-DSL-defined-task-snprintf
Dec 1, 2023
Merged

If the DSL defines a task_snprintf function, use that function.#603
therault merged 1 commit intoICLDisco:masterfrom
therault:hotfix-DSL-defined-task-snprintf

Conversation

@therault
Copy link
Copy Markdown
Contributor

@therault therault commented Dec 1, 2023

This feature was lost in a previous merge accident, but it should have been enabled via PR #409

This feature was lost in a previous merge accident, but it
should have been enabled via PR ICLDisco#409
@therault therault requested a review from a team as a code owner December 1, 2023 22:01
@therault therault merged commit 360b358 into ICLDisco:master Dec 1, 2023
therault added a commit to therault/parsec that referenced this pull request Dec 7, 2023
When there are no parameters to a task (as for some
sample_tasks() in dtd_test_task_generation), using
`GET_HEAD_OF_PARAM_LIST(dtd_ask)` does not return NULL,
but there are no parameters and we should not cycle
over them.

This bug started to manifest after using the DSL
specific task_snprintf for all task_snprintfs in
PR ICLDisco#603.

I'm reading tc->nb_flows in a separate variable at
the beginning of the code, so the compiler should be
smart enough to store that in a register or realize that
if nb_flows is not 0 the first time it does the loop,
it will never become 0 and it can only test current_param != NULL
therault added a commit to therault/parsec that referenced this pull request Dec 7, 2023
It's possible that parsec_dtd_task_snprintf is called
when the `->next` field of the parameters copied at
the end of the task are invalid. One should not access
them using `->next` as we do when parsing the user
input, but knowing they are stored as in an array
at the end of the task, starting at byte
`GET_HEAD_OF_PARAM_LIST(dtd_task)`

This bug started to manifest after using the DSL
specific task_snprintf for all task_snprintfs in
PR ICLDisco#603.

This code also correctly manages the case when count_of_params
is 0, but there are no tests like that today.
bosilca added a commit to bosilca/parsec that referenced this pull request Dec 8, 2023
And a proper fix for the dtd_task_snprintf.

The DTA task's parameters were created as an array but also maintained
as a linked list. There was no need for both access modes, so array
stayed while linked list dissapeared.

Fix all the the uses of the DTD task params to be consistent.

This is a more comprehensive replacement for ICLDisco#607, that addresses the
real cause of the problem with DTD task_snprintf reported by
@abouteiller.

Fixes ICLDisco#603.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
bosilca added a commit to bosilca/parsec that referenced this pull request Dec 8, 2023
And a proper fix for the dtd_task_snprintf.

The DTA task's parameters were created as an array but also maintained
as a linked list. There was no need for both access modes, so array
stayed while linked list dissapeared.

Fix all the the uses of the DTD task params to be consistent.

This is a more comprehensive replacement for ICLDisco#607, that addresses the
real cause of the problem with DTD task_snprintf reported by
@abouteiller.

Fixes ICLDisco#603.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
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