[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in grub_xputs_normal
From: |
Stephan Gabert |
Subject: |
Bug in grub_xputs_normal |
Date: |
Fri, 19 Jul 2019 12:36:21 +0200 |
User-agent: |
Kolab 3.4/Roundcube 1.1.12 |
Hello dear GRUB developers,
I recently came across a strange behavior of GRUB2:
Calling grub_printf with an 80 character string (grub_printf(str) == 80)
80 times in a row leads to grub being unresponsive and de facto being
trapped in endless loop (of printing newlines?).
This behavior does not occur before switching to normal mode, when
grub_printf still calls grub_xputs_dumb. It only occurs after switching
to normal mode, when grub_printf calls grub_xputs_normal.
The bug is not triggered, if 80*80 (or more) characters are being
printed at once by grub_printf:
A string of at least 80 characters has to be grub_printf'd at least 80
times in a row.
I attached a small patch to demonstrate the bug:
- printf_test prints an 80-char long string 80 times successively
- this test succeeds with grub_printf using grub_xputs_dumb (before
normal mode)
- this test fails with grub_printf using grub_xputs_normal (after
switching to normal mode)
I could reproduce this behavior within qemu and on several different
physical systems. For testing, I used the current master-branch and
grub-2.02-rc2 (8014b7b), but prior versions are affected too probably.
Best regards,
Stephan
bug-xputs.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug in grub_xputs_normal,
Stephan Gabert <=