Skip to content

[lldb][Windows] Fixed the TestIOHandlerResizeNoEditline test #92286

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

Merged

Conversation

slydiman
Copy link
Contributor

This test caused python crash on Windows x86_64 host with the exit code 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN). Close the input stream before exit to avoid this crash.

This test caused python crash on Windows x86_64 host with the exit code 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN).
Close the input stream before exit to avoid this crash.
@slydiman slydiman requested a review from JDevlieghere as a code owner May 15, 2024 15:48
@llvmbot llvmbot added the lldb label May 15, 2024
@slydiman slydiman requested review from DavidSpickett and labath May 15, 2024 15:48
@llvmbot
Copy link
Member

llvmbot commented May 15, 2024

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

Changes

This test caused python crash on Windows x86_64 host with the exit code 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN). Close the input stream before exit to avoid this crash.


Full diff: https://github.com/llvm/llvm-project/pull/92286.diff

1 Files Affected:

  • (modified) lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py (+1)
diff --git a/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py b/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py
index 3c07554f6cafd..bbc2dcbe4e30a 100644
--- a/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py
+++ b/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py
@@ -18,3 +18,4 @@ def test_resize_no_editline(self):
         dbg.RunCommandInterpreter(True, True, opts, 0, False, False)
         # Try resizing the terminal which shouldn't crash.
         dbg.SetTerminalWidth(47)
+        dbg.GetInputFile().Close()

@slydiman slydiman merged commit d92c677 into llvm:main May 15, 2024
6 checks passed
@labath
Copy link
Collaborator

labath commented May 16, 2024

This probably means you can also remove the skipIfWindows decorator, as the test doesn't actually do anything target-specific.

(It also feels a bit like this is working around something -- I don't see why not closing a file should cause anything to crash -- but that's probably fine since the test is about terminal resizing.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants