Skip to content

fix: reject VAR_IN_OUT access from outside the declaring POU#1806

Open
ghaith wants to merge 1 commit into
masterfrom
fix/var_in_out_writes
Open

fix: reject VAR_IN_OUT access from outside the declaring POU#1806
ghaith wants to merge 1 commit into
masterfrom
fix/var_in_out_writes

Conversation

@ghaith

@ghaith ghaith commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Reading or writing a VAR_IN_OUT member of a function block or program instance (e.g. fbInstance.inOut := 1;) passed validation and dereferenced an unbound pointer at runtime. Such accesses are now reported as E037, mirroring the existing VAR_OUTPUT scope rule. Binding the variable in a call (fbInstance(inOut := x)) remains valid.

Reading or writing a VAR_IN_OUT member of a function block or program
instance (e.g. `fbInstance.inOut := 1;`) passed validation and
dereferenced an unbound pointer at runtime. Such accesses are now
reported as E037, mirroring the existing VAR_OUTPUT scope rule.
Binding the variable in a call (`fbInstance(inOut := x)`) remains
valid.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Build Artifacts

🐧 Linux

Artifact Link Size
deb-x86_64 Download 38.4 MB
schema Download 0.0 MB
stdlib Download 32.3 MB
plc-x86_64 Download 43.4 MB
deb-aarch64 Download 30.8 MB
plc-aarch64 Download 43.3 MB

From workflow run

🪟 Windows

Artifact Link Size
stdlib.lib Download 4.0 MB
stdlib.dll Download 0.1 MB
plc.exe Download 38.3 MB

From workflow run

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.

1 participant