Branch: refs/heads/topic/bbannier/issue-2124
Home:
https://github.com/zeek/spicy
Commit: d5aa7096438a6791d8fbec0c19538e93d44de733
https://github.com/zeek/spicy/commit/d5aa7096438a6791d8fbec0c19538e93d44de733
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.switch/output
Log Message:
-----------
Properly model switch case condition reads.
For switch statements we synthesize a condition declaration and each
switch case we then perform equality checks. Previously we would only
store the case label in the CFG.
This patch fixes the implementation so we instead store the checks
against the condition variable. With that we properly model e.g., reads
of the condition variable which otherwise could appear unused.
Commit: f6212aea833fb4facfb23a31960c367249ffba80
https://github.com/zeek/spicy/commit/f6212aea833fb4facfb23a31960c367249ffba80
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.switch/output
Log Message:
-----------
Fix CFG modelling of switch cases with multiple labels.
Switch cases with multiple labels were previously stored as a chain of
expressions which roughly corresponds to an AND. This patch fixes the
implementation to instead model them as separate branches which
corresponds to an OR and is closer to their actual behavior.
Commit: 56471f8ad2a947195b9e704b1da3533374e99489
https://github.com/zeek/spicy/commit/56471f8ad2a947195b9e704b1da3533374e99489
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.switch/output
Log Message:
-----------
Prevent removing switch statements which only have a default case.
Commit: 1917ec343575410d92fe6c96ac0a23c06a7f940c
https://github.com/zeek/spicy/commit/1917ec343575410d92fe6c96ac0a23c06a7f940c
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/include/compiler/detail/cfg.h
M hilti/toolchain/src/compiler/cfg.cc
M hilti/toolchain/src/compiler/optimizer.cc
M tests/Baseline/hilti.cfg.assign/output
M tests/Baseline/hilti.cfg.dead-write-shadowed/output
M tests/Baseline/hilti.cfg.return/output
M tests/Baseline/hilti.cfg.switch/output
M tests/Baseline/hilti.optimization.dataflow-unreachable/output
M tests/Baseline/spicy.optimization.feature_requirements/log
M tests/Baseline/spicy.optimization.feature_requirements/opt.hlt
M tests/Baseline/spicy.optimization.unused-functions/log
M tests/Baseline/spicy.optimization.unused-functions/opt.hlt
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.optimization.unused-types/opt.hlt
M tests/hilti/cfg/assign.hlt
Log Message:
-----------
Properly store declarations.
Commit: 0a600784647ab54dae3aded1a3f4ea9c1f5cabce
https://github.com/zeek/spicy/commit/0a600784647ab54dae3aded1a3f4ea9c1f5cabce
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.assign/output
M tests/Baseline/hilti.cfg.dead-write-shadowed/output
M tests/Baseline/hilti.cfg.try/output
M tests/Baseline/hilti.cfg.unreachable-return/output
M tests/hilti/cfg/assign.hlt
Log Message:
-----------
Fix cfg handling of RHS assignments in variable declarations.
Commit: 0de02795891e718e52245e34270e18c361cb380d
https://github.com/zeek/spicy/commit/0de02795891e718e52245e34270e18c361cb380d
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/include/compiler/detail/cfg.h
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.assign/output
A tests/Baseline/hilti.cfg.bla/output
M tests/Baseline/hilti.optimization.dataflow-unreachable/output
A tests/hilti/cfg/bla.hlt
Log Message:
-----------
Fix computation of aliasing and variable access in CFG.
We would previously not computing aliasing and variable reads correctly
which could lead to us incorrectly modifying code involving e.g., struct
values. This patch reworks how this is done.
To implement this correctly we also need to add function parameters to
the CFG.
Closes #2124.
Commit: f95325daf238852068150ea090094541b8fd74d5
https://github.com/zeek/spicy/commit/f95325daf238852068150ea090094541b8fd74d5
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M hilti/toolchain/src/compiler/optimizer.cc
Log Message:
-----------
Remove workaround for C++17.
Commit: 0510346c8c19aaa3c0c30fcb1beff6b6f5d1f0b5
https://github.com/zeek/spicy/commit/0510346c8c19aaa3c0c30fcb1beff6b6f5d1f0b5
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M .pre-commit-config.yaml
Log Message:
-----------
Bump pre-commit hooks.
Commit: 8755213f670f94fca8c6770f38170c676d8c7d52
https://github.com/zeek/spicy/commit/8755213f670f94fca8c6770f38170c676d8c7d52
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-08-29 (Fri, 29 Aug 2025)
Changed paths:
M .pre-commit-config.yaml
Log Message:
-----------
Use non-legacy ruff-check version for pre-commit.
Compare:
https://github.com/zeek/spicy/compare/d5aa7096438a%5E...8755213f670f
To unsubscribe from these emails, change your notification settings at
https://github.com/zeek/spicy/settings/notifications