Mercurial > hg > Members > Moririn
changeset 467:4ec61e201c19
Fix segmentation fault for calc.cbc
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 21 Dec 2017 20:58:39 +0900 |
parents | 831b7f6fd687 |
children | ac244346c85d |
files | src/parallel_execution/examples/calc/calc.cbc src/parallel_execution/generate_stub.pl |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/examples/calc/calc.cbc Thu Dec 21 18:52:21 2017 +0900 +++ b/src/parallel_execution/examples/calc/calc.cbc Thu Dec 21 20:58:39 2017 +0900 @@ -62,7 +62,7 @@ loopCounter->i = 0; taskManager->next = C_exit_code; - goto taskManager->shutdown(exit_code); + goto meta(context, taskManager->taskManager->TaskManager.shutdown); } __code createTask2(struct LoopCounter* loopCounter, struct TaskManager* taskManager) {
--- a/src/parallel_execution/generate_stub.pl Thu Dec 21 18:52:21 2017 +0900 +++ b/src/parallel_execution/generate_stub.pl Thu Dec 21 20:58:39 2017 +0900 @@ -520,8 +520,8 @@ print $fd "\t*O_$arg = $v;\n"; } if ($inParGoto) { - print $fd "${prev}taskManager->tasks = context->tasks;\n"; - print $fd "${prev}taskManager->next1 = C_$next;\n"; + print $fd "${prev}Gearef(context, TaskManager)->tasks = context->tasks;\n"; + print $fd "${prev}Gearef(context, TaskManager)->next1 = C_$next;\n"; print $fd "${prev}goto meta(context, C_$next);\n"; } else { print $fd "${prev}goto meta(context, $next);\n"; @@ -529,8 +529,8 @@ next; } if ($inParGoto) { - print $fd "${prev}taskManager->tasks = context->tasks;\n"; - print $fd "${prev}taskManager->next1 = C_$next;\n"; + print $fd "${prev}Gearef(context, TaskManager)->tasks = context->tasks;\n"; + print $fd "${prev}Gearef(context, TaskManager)->next1 = C_$next;\n"; print $fd "${prev}goto meta(context, C_$next);\n"; next; } elsif ($next eq "meta") {