Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: perform send channel action for select #665

Merged
merged 6 commits into from
Jun 10, 2020
Merged

Conversation

mvertes
Copy link
Member

@mvertes mvertes commented May 29, 2020

The CFG was wrong for select send comm clauses. If an init operation
on channel was required (like a derefence, index operation, ...) it
was skipped. The bug was invisible in case of a local var channel.

A send channel init operation consist to prepare both the data to
send (right subtree of send AST) and the channel itself (left
subtree of send AST). All channel init operation must be performed
prior to call select.

Fixes #647.

The CFG was wrong for select send comm clauses. If an init operation
on channel was required (like a derefence, index operation, ...) it
was skipped. The bug was invisible in case of a local var channel.

A send channel init operation consist to prepare both the data to
send (right subtree of send AST) and the channel itself (left
subtree of send AST). All channel init operation must be performed
prior to call select.

Fixes #647.
@mvertes mvertes added area/core bug Something isn't working labels May 29, 2020
@mvertes mvertes added this to the v0.8.x milestone May 29, 2020
@mvertes mvertes requested a review from mpl June 2, 2020 16:10
please note that this also changes the logic a little bit, since the
line that was:

if pn != nil {

now implictly becomes:

if an != nil && pn != nil {

(which I think is actually more correct).
@mvertes mvertes merged commit 0ef7f8f into master Jun 10, 2020
@mvertes mvertes deleted the fix-send-select branch June 10, 2020 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

select choosing default over channel write
2 participants