Skip to content

Fix 13930: False positive: valueflow and other variable - #7827

Merged
chrchr-github merged 10 commits into
cppcheck-opensource:mainfrom
pfultz2:program-memory-use-new-pm-assign
Sep 22, 2025
Merged

Fix 13930: False positive: valueflow and other variable #7827
chrchr-github merged 10 commits into
cppcheck-opensource:mainfrom
pfultz2:program-memory-use-new-pm-assign

Conversation

@pfultz2

Copy link
Copy Markdown
Collaborator

No description provided.

@firewave

Copy link
Copy Markdown
Collaborator

Seems to have no performance impact.

Differences from #7800:

Details
--- selfcheck.exp 2025-09-16 19:07:40.536686518 +0200+++ selfcheck.res 2025-09-16 19:10:17.478078548 +0200@@ -12375,15 +12375,15 @@
= always 0
0 always 0
Line 1366
- ch possible {symbolic=(next),symbolic=(end),0,62@103}+ ch possible {symbolic=(next),symbolic=(end),0,92,62@103}
!= {!<=-1,!>=2,0}
end possible {symbolic=(ch),62@103}
&& {!<=-1,!>=2,0}
- ch {!symbolic=(end),0}+ ch {!symbolic=(end),0,92}
!= {!<=-1,!>=2,1}
'\r' always 13
&& {!<=-1,!>=2,0}
- ch {!symbolic=(end),0,!13}+ ch {!symbolic=(end),0,!13,92}
!= {!<=-1,!>=2,1}
'\n' always 10
&& {!<=-1,!>=2,0}
@@ -13626,6 +13626,8 @@
tok2 possible symbolic=(tok->next)
Line 2108
true always 1
+Line 2109+ . possible symbolic=(tok2)
Line 2112
& {lifetime[Address]=(temp),!0}
Line 2113
@@ -15074,7 +15076,7 @@
Line 2872
"code point too large" always "code point too large"
Line 2876
- narrow always {!<=-1,!>=2}+ narrow {!<=-1,!>=2,0}
|| always {!<=-1,!>=2}
utf8 always {!<=-1,!>=2}
&& always {!<=-1,!>=2}

The change on Line 2109 seems suspect. I only realize that because I had the same diff with an unintentional issue I temporally introduced in another PR - see #7768 (comment).

@pfultz2

Copy link
Copy Markdown
CollaboratorAuthor

@chrchr-github@danmar@orbitcowboy Can this be merged?

Comment threadlib/programmemory.cpp
Comment threadlib/programmemory.cpp Outdated
@sonarqubecloud

Copy link
Copy Markdown

@chrchr-github
chrchr-github merged commit 35dc425 into cppcheck-opensource:mainSep 22, 2025
53 checks passed
@firewave

Copy link
Copy Markdown
Collaborator

The change on Line 2109 seems suspect. I only realize that because I had the same diff with an unintentional issue I temporally introduced in another PR - see #7768 (comment).

What about that change? I still think that is a bug.

@pfultz2

pfultz2 commented Sep 24, 2025

Copy link
Copy Markdown
CollaboratorAuthor

The change on Line 2109 seems suspect. I only realize that because I had the same diff with an unintentional issue I temporally introduced in another PR - see #7768 (comment).

What about that change? I still think that is a bug.

@firewave Can you provide some more info? What source is this changing?

Sign up for freeto 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.

3 participants

@pfultz2@firewave@chrchr-github