All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Georgi <patrick@georgi-clan.de>
To: grub-devel@gnu.org
Subject: two bugs in configfile parser
Date: Fri, 01 Aug 2008 01:44:53 +0200	[thread overview]
Message-ID: <g6tios$aa7$1@ger.gmane.org> (raw)

Hi,

given the following grub.cfg (simplified test case):

menuentry "test" {
if test "a" = "a" ; then
   echo foo
fi
}

I have some issues. To reproduce, load grub with that file, enter the 
editor on the menu item, run it with ctrl-x.
Two things can happen (I have some local patches which lead to one 
happening slightly more often than the other, so it seems to be quite 
sensitive to $whatever):

  1. it crashes on malloc magic problems. It seems to be related to the 
leading spaces on "echo foo". If I remove them, it works. I guess, 
they're skipped at some place, and after that, the string should be 
grub_free()d. grub's mm doesn't support that.

  2. it corrupts the text once it finishes. After removing the leading 
spaces, it runs correctly and returns to the editor. Unfortunately, 
starting with "  echo foo", the text is corrupted. Another run (with all 
those garbage strings) ends in malloc magic error.

That code runs fine if executed directly from the menu.


Regards,
Patrick Georgi




             reply	other threads:[~2008-07-31 23:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 23:44 Patrick Georgi [this message]
2008-08-01 16:49 ` two bugs in configfile parser Bean
2008-08-05 10:17   ` Marco Gerards
2008-08-05 10:34     ` Bean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g6tios$aa7$1@ger.gmane.org' \
    --to=patrick@georgi-clan.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.