Hi there,
v0.16 segfaults when it is given a config file without an opening
[section] header. This means a file containing just
email=foo@bar
(without [user]) will cause a segfault in config_open,
@ 0xf7776410 928 __kernel_rt_sigreturn
@ 0xf6e8f52b 80 config_open
@ 0xf6e8d82b 64 git_config_add_file
@ 0xf6e8d90c 64 git_config_add_file_ondisk
@ 0xf6e9f8ca 112 git_repository_config__weakptr
@ 0xf6e9fa3e 96 git_repository_open
This seems to be fixed if I upgrade to the latest & greatest from the
development branch, but I'm a bit worried that this will open another
can of bugs.
Is there a commit that you guys can recommend me? Or, alternatively,
is there a 0.18 release coming shortly?
--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Bisect points to fefd4551a5b53c6c0572bdcb063f113b0a763e1d as fixing the issue; since that has little other changes from 0.16, I'll take that one. On Tue, Mar 13, 2012 at 1:29 PM, Han-Wen Nienhuys <hanwenn@gmail.com> wrote: > v0.16 segfaults when it is given a config file without an opening > [section] header. This means a file containing just > > email=foo@bar > > (without [user]) will cause a segfault in config_open, > > @ 0xf7776410 928 __kernel_rt_sigreturn > @ 0xf6e8f52b 80 config_open > @ 0xf6e8d82b 64 git_config_add_file > @ 0xf6e8d90c 64 git_config_add_file_ondisk > @ 0xf6e9f8ca 112 git_repository_config__weakptr > @ 0xf6e9fa3e 96 git_repository_open > > This seems to be fixed if I upgrade to the latest & greatest from the > development branch, but I'm a bit worried that this will open another > can of bugs. > > Is there a commit that you guys can recommend me? Or, alternatively, > is there a 0.18 release coming shortly? > > -- > Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
On Wed, 2012-03-14 at 09:35 -0300, Han-Wen Nienhuys wrote: > Bisect points to > > fefd4551a5b53c6c0572bdcb063f113b0a763e1d > > as fixing the issue; since that has little other changes from 0.16, > I'll take that one. Then it's a happy coincidence, as that wasn't meant to produce any changes in behaviour. Another good fix is not to use badly-formatted configuration files. cmn > > On Tue, Mar 13, 2012 at 1:29 PM, Han-Wen Nienhuys <hanwenn@gmail.com> wrote: > > v0.16 segfaults when it is given a config file without an opening > > [section] header. This means a file containing just > > > > email=foo@bar > > > > (without [user]) will cause a segfault in config_open, > > > > @ 0xf7776410 928 __kernel_rt_sigreturn > > @ 0xf6e8f52b 80 config_open > > @ 0xf6e8d82b 64 git_config_add_file > > @ 0xf6e8d90c 64 git_config_add_file_ondisk > > @ 0xf6e9f8ca 112 git_repository_config__weakptr > > @ 0xf6e9fa3e 96 git_repository_open > > > > This seems to be fixed if I upgrade to the latest & greatest from the > > development branch, but I'm a bit worried that this will open another > > can of bugs. > > > > Is there a commit that you guys can recommend me? Or, alternatively, > > is there a 0.18 release coming shortly? > > > > -- > > Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen > > >
On Fri, Mar 16, 2012 at 6:18 AM, Carlos Martín Nieto <carlos@cmartin.tk> wrote: >> fefd4551a5b53c6c0572bdcb063f113b0a763e1d >> >> as fixing the issue; since that has little other changes from 0.16, >> I'll take that one. > > Then it's a happy coincidence, as that wasn't meant to produce any > changes in behaviour. > > Another good fix is not to use badly-formatted configuration files. If your program has users, that is not a "fix", but rather "herding cats", something I'd like to avoid if I can. -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
On Fri, Mar 16, 2012 at 1:50 PM, Han-Wen Nienhuys <hanwenn@gmail.com> wrote: > On Fri, Mar 16, 2012 at 6:18 AM, Carlos Martín Nieto <carlos@cmartin.tk> wrote: >>> fefd4551a5b53c6c0572bdcb063f113b0a763e1d >>> >>> as fixing the issue; since that has little other changes from 0.16, >>> I'll take that one. >> >> Then it's a happy coincidence, as that wasn't meant to produce any >> changes in behaviour. >> >> Another good fix is not to use badly-formatted configuration files. > > If your program has users, that is not a "fix", but rather "herding > cats", something I'd like to avoid if I can. Han-Wen certainly has a point. Unfortunately, as long as we're on beta we don't backport fixes to older releases. The commit you point at will work nicely enough.