GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix hang on UTF-16 LE BOM file by chrchr-github · Pull Request #636 · cppcheck-opensource/simplecpp

Conversation

@chrchr-github

@chrchr-github chrchr-github commented Mar 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

fixes #637

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chrchr-github added 2 commits March 27, 2026 15:18
@chrchr-github
Fix hang on UTF- 16 LE BOM file
14a44eb
@chrchr-github
Update simplecpp.cpp
4cc9e60
@chrchr-github chrchr-github changed the title Fix hang on UTF- 16 LE BOM file Fix hang on UTF-16 LE BOM file Mar 27, 2026
@chrchr-github
Update simplecpp.cpp
b928752
@firewave

firewave commented Mar 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Yeah - there's several places which lack checks for EOF. I have WIP tests for that and other corner cases/gaps somewhere - something to be done in preparation of #566.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

With #647 it should be possible to write a test which uses the input in question.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrchr-github

chrchr-github commented Apr 12, 2026

Copy link
Copy Markdown
Contributor Author

With #647 it should be possible to write a test which uses the input in question.

Can we just run the tests with all three options?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Can we just run the tests with all three options?

Yes, if somebody adds the functionality. It didn't seem straight forward to me so I haven't yet. Feel free to do so.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

I think I took a wrong turn. That should trigger with regular unit test. So please add a test for it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

I think I took a wrong turn. That should trigger with regular unit test. So please add a test for it.

Ah - you mentioned FileStream in the ticket. Still I think we should have a unit test (if missing).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chrchr-github added 6 commits May 13, 2026 14:40
@chrchr-github
Update simplecpp.cpp [skip ci]
bcb50ec
@chrchr-github
Update integration_test.py
9f371ac
@chrchr-github
Update integration_test.py
47f267c
@chrchr-github
Update integration_test.py
ed1fef4
@chrchr-github
Update simplecpp.cpp
ebe842f
@chrchr-github
Update integration_test.py
b004fad
@chrchr-github

chrchr-github commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

So there is also some kind of platform divergence going on...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrchr-github

chrchr-github commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

These (hanging) runs may be cancelled by the way:
https://github.com/cppcheck-opensource/simplecpp/actions/runs/25805772896
https://github.com/cppcheck-opensource/simplecpp/actions/runs/25805772942/job/75807948771

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrchr-github
Update integration_test.py
202f265
@chrchr-github

chrchr-github commented May 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

So there is also some kind of platform divergence going on...

Of course f.write("\xFF\xFE\x3B\x00") does something different on Linux, because why wouldn't it?

~$ hexdump pytest.cpp 
0000000 bfc3 bec3 003b                         
0000006
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrchr-github
chrchr-github marked this pull request as ready for review May 13, 2026 18:21
@danmar

danmar commented May 15, 2026

Copy link
Copy Markdown
Collaborator

I guess CI will be fixed by #641

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

danmar
danmar reviewed May 15, 2026
View reviewed changes
Comment thread simplecpp.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

chrchr-github and others added 2 commits May 15, 2026 19:24
@chrchr-github
Merge branch 'cppcheck-opensource:master' into chr_utf16
dd90001
@web-flow
Return int
b530236
danmar
danmar reviewed May 25, 2026
View reviewed changes
Comment thread simplecpp.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

danmar
danmar approved these changes May 25, 2026
View reviewed changes
@danmar

danmar commented May 26, 2026

Copy link
Copy Markdown
Collaborator

@chrchr-github I want to release simplecpp so we can update cppcheck repo before the release. do you want to merge now to get this into the release or rather wait?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danmar

danmar commented May 26, 2026

Copy link
Copy Markdown
Collaborator

I have approved it, as far as I see it can be merged into the release.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrchr-github

chrchr-github commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@chrchr-github I want to release simplecpp so we can update cppcheck repo before the release. do you want to merge now to get this into the release or rather wait?

It's also a hang in cppcheck, so we might as well merge it (I don't have permission though).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danmar
danmar merged commit 4ca0ee6 into cppcheck-opensource:master May 27, 2026
25 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@CrJyyy CrJyyy mentioned this pull request Aug 4, 2026
Infinite loop with unbounded memory on a 4-byte UTF-16 file that ends in an identifier character #693
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@firewave firewave firewave left review comments
@danmar danmar danmar approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Hang on UTF-16 with BOM

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@chrchr-github @firewave @danmar @web-flow
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.