[aesop] #78: local var not lifted into __ae_ctl
#78: local var not lifted into __ae_ctl --------------------+------------------------------------------------------- Reporter: jenkins | Owner: Type: defect | Status: new Priority: major | Component: code generator Version: | Keywords: --------------------+------------------------------------------------------- When a variable is declared within the lexical scope of a {{{for}}} loop, it is not put into the {{{__ae_ctl->params}}} structure, instead remaining a local variable. When an aesop function ({{{__blocking}}} or similar) is called and control returns in a different thread, the variable is then potentially in an uninitialized state. The test case for reproduction can be found at tests/parser/local-var- forloop.ae. The important bit is: {{{ for (i = 0; i < 1; i++){ int var = 666; do_something(); // <-- is a __blocking function if (var != 666){ fprintf(stderr, "ERROR: local var has changed (likely uninitialized)"\n); return -1; } } }}} -- Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/78> aesop <https://trac.mcs.anl.gov/projects/aesop> The Aesop Language
#78: local var not lifted into __ae_ctl --------------------+------------------------------------------------------- Reporter: jenkins | Owner: Type: defect | Status: new Priority: major | Component: code generator Version: | Keywords: --------------------+------------------------------------------------------- Comment(by jenkins): Upon further coding in triton, it looks like this issue happens for all vars declared within the lexical scope of a branch (for, while, if). Haven't checked some others (switch, do/while), but I'd imagine they have the same problem as well. -- Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/78#comment:1> aesop <https://trac.mcs.anl.gov/projects/aesop> The Aesop Language
participants (1)
-
aesop