URL:
<https://savannah.gnu.org/bugs/?56654>
Summary: Bug in grub_xputs_normal
Project: GNU GRUB
Submitted by: sgabert
Submitted on: Mon 22 Jul 2019 06:26:14 AM UTC
Category: None
Severity: Major
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release:
Release: Git master
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
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.
(originally sent to bug-grub:
https://lists.gnu.org/archive/html/bug-grub/2019-07/msg00015.html)
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 22 Jul 2019 06:26:14 AM UTC Name: bug-xputs.patch Size: 2KiB By:
sgabert
A small patch that triggers the bug.
<http://savannah.gnu.org/bugs/download.php?file_id=47245>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56654>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
_______________________________________________
Bug-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub