Bug 2629

Summary: Segmentation faults and division by zero in Grub on ext2
Product: buildroot Reporter: Bjarne Juul Pasgaard <kdebjp>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: i686 Target: i686
Build: i686
Attachments: Patch to be applied on top of buildroot-2010.08

Description Bjarne Juul Pasgaard 2010-09-22 19:18:12 UTC
Created attachment 2533 [details]
Patch to be applied on top of buildroot-2010.08

This report covers two issues found in buildroot 2010.08, which relies on grub_0.97.orig.tar.gz with patches from grub_0.97-35.diff.gz (both available from http://snapshot.debian.net/archive/2008/03/29/debian/pool/main/g/grub/):

1) A segmentation fault occurred in the grub command line utility due to the use of var_args in a way that was incompatible with the code generated by GCC 4.3.5:
The grub code was using its own var_args parsing mechanism in order to avoid linking to the C standard library. However, this code was apparently incompatible with the var_args related code generated by GCC 4.3.5.

2) A floating point exception occurred both in the grub command line utility and in the ext2 file system handling of the boot loader:
This issue has been reported and fixed elsewhere as well (see, e.g., http://bugs.gentoo.org/show_bug.cgi?id=220687).

Both problems have been fixed in the attached patch.
Comment 1 Thomas Petazzoni 2014-01-07 07:40:09 UTC
Since this report, we've updated the Debian revision of the Grub we're using in Buildroot. It contains the fix for the problem (2) you mention. I haven't checked for problem (1), but Grub runs fine here, tested under Qemu with an ext2 filesystem.

Marking the bug as fixed. Don't hesitate to reopen if you're still having problems with Grub on 2013.11.