x64 FileGet() causes crash in Studio 2022E beta

Started by sdorn, December 13, 2022, 09:53:08 PM

Previous topic - Next topic

sdorn

Hello, I get a repeatable crash in x64 Studio 2022C and 2022E beta when using FileGet() with a large-ish (55MB) file.
  - The file is XML (ASCII text)
  - The error is "64-bit debugger connection failed - 800706C6"
               
  - No error when running in 32 bit mode
  - The XML file can be downloaded here if needed  -  https://file.io/yKbFtNbBlnG5
Thanks.

td

This is a 64-bit debugger problem and not a WinBatch or the WIL DLL or any changes made for the beta problem. We will try to get the debugger fixed before the next release. Thanks for taking the time to report the problem.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Well, that was interesting. It was very much a data-driven problem. As it happened the reported XML file's lines were all terminated with a carriage return-line feed pair except for the fourth line which only had a line feed terminator. The missing carriage return caused the 64-bit debugger to overwrite by one character the buffer used to pass the variable's partial content back to WinBatch Studio's variable list window. Because the 64-bit debugger runs in a 64-bit process it uses a thunking technique to pass data back to WinBatch Studio's 32-bit process. The thunking process is much more sensitive to a buffer overwrite than the 32-bit debugger running in a different thread in the 32-bit WinBatch Studio because no thunking is involved.

The problem will be corrected in the next general release.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

((I just love that "thunking" is a word.  It's so great.))
The mind is everything; What you think, you become.

td

According to Meriam-Webster, it is both a verb and noun:
https://www.merriam-webster.com/dictionary/thunk

In computer science, the word is usually used as a noun but in the best MSFT tradition of using nouns as verbs, I have used it as a verb.
https://en.wikipedia.org/wiki/Thunk

The part that is so unusual about this issue is that to encounter the bug you needed to have a line feed or tab character at exactly one location in a string. If either character occurs anywhere else in the string the error will not occur.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

sdorn

I'm glad I found a way to upload the file, saved you from a mystery "snipe hunt". I'm not sure where I lost the LF, maybe an error on my side driving that. Thanks for looking into it and the analysis.