Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL vs Powershell may cause Undefined Behavior. #937

Open
JulianKnodt opened this issue Oct 17, 2023 · 2 comments
Open

WSL vs Powershell may cause Undefined Behavior. #937

JulianKnodt opened this issue Oct 17, 2023 · 2 comments

Comments

@JulianKnodt
Copy link

I've been running an application in WSL, and have found that as I pass more and more CLI arguments, it will cause an unrelated portion of my app to crash. I assumed that it was related to prior issues that there was a memory leak somewhere, but I had properly initialized all my values. (I can't show the app's source)

I then tried the exact same command that crashes in WSL on Powershell, and found that it does not crash. I'm not entirely sure whether it is an issue with line endings that causing this, as I have not dug into the source thoroughly, but this a guess since it may be an assumption made somewhere in the source.

I thought I'd let y'all know. Thank you for creating CLI11!

@phlptp
Copy link
Collaborator

phlptp commented Oct 17, 2023

Going to need a few more details to help with anything. If you can point to any code or code blocks in CLI11 you think might be the source of the issue that would be helpful. Otherwise not sure I can do much.

@JulianKnodt JulianKnodt changed the title WSL vs Powershell eol may cause Undefined Behavior. WSL vs Powershell may cause Undefined Behavior. Oct 18, 2023
@JulianKnodt
Copy link
Author

Hm.... I'm not sure if there is anything to actively be done. To be clear exactly how I'm repro-ing this, I compile with VS (2019?) on Windows 11, then I run the exe from WSL. I looked at the two functions that I saw in CLI11 that checked for _MSC_VER, but both of them didn't seem to make any assumptions about the content. If there is an error there, it could be an error with how windows registers binfmt_misc (from my understanding).

I'm not sure if there is anything that can be actively done now, but maybe could be randomly identified later.

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

No branches or pull requests

2 participants