Fix failure load locale template.

The call to open_tmpl_archive was being passed a pointer to an
object allocated on the stack. The object on the stack is not
guaranteed to be initialized to zero so we need to minimally
initialize `fname' in the struct locarhandle to ensure that
open_tml_archive loads the default tempalte.

This error was seen while debugging glibc installs in a qemu
VM where it is more likely the stack pages were dirty. It has
not been reported on non-VM systems.
This commit is contained in:
Carlos O'Donell 2014-02-24 22:33:35 -05:00
parent c4fcabb222
commit eaa1d42819
2 changed files with 5 additions and 1 deletions

View File

@ -558,6 +558,7 @@ int main (int argc, char *argv[])
error (EXIT_FAILURE, errno, "cannot open directory \"%s\"", loc_path);
/* Use the template file as specified on the command line. */
tmpl_ah.fname = NULL;
if (argc > 1)
tmpl_ah.fname = argv[1];

View File

@ -1,6 +1,6 @@
%define glibcsrcdir glibc-2.19-58-ga4fb786
%define glibcversion 2.19.90
%define glibcrelease 1%{?dist}
%define glibcrelease 2%{?dist}
# Pre-release tarballs are pulled in from git using a command that is
# effectively:
#
@ -1621,6 +1621,9 @@ rm -f *.filelist*
%endif
%changelog
* Mon Feb 24 2014 Carlos O'Donell <carlos@redhat.com> - 2.19.90-2
- Fix build-locale-archive failure to open default template.
* Tue Feb 18 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-1
- Sync with upstream master.