Skip to content

Fix a bug in CodeQL query where branches were summed and not maxed#2212

Open
pguyot wants to merge 1 commit intoatomvm:mainfrom
pguyot:w12/codeql-fix-mutually-exclusive-false-positive
Open

Fix a bug in CodeQL query where branches were summed and not maxed#2212
pguyot wants to merge 1 commit intoatomvm:mainfrom
pguyot:w12/codeql-fix-mutually-exclusive-false-positive

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Mar 18, 2026

When we can prove two branches are mutually exclusive, we should take the maximum of the allocation, not the sum. This yielded false positives.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

When we can prove two branches are mutually exclusive, we should take
the maximum of the allocation, not the sum. This yielded false positives.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI gets stuck for a long time. I think there is some sort of infinite loop or anything like that.

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.

2 participants