git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git segfaults on older Solaris releases

From
Tom G. Christensen <tgc@jupiterrise.com>
Date
Apr 9, 2016, 07:02 UTC
Message-ID
<5708A90E.1050705@jupiterrise.com>
In-Reply-To
<5706C0D4.9030707@jupiterrise.com>
On 07/04/16 22:19, Tom G. Christensen wrote:
Show 13 quoted lines
> On 07/04/16 20:50, Junio C Hamano wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>> So perhaps this is all we need to fix your box.
>>
>>   setup.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>
> I applied this patch to 2.8.0 and have completed a testsuite run on
> Solaris 2.6/x86 with only a few unrelated problems.
> I will continue testing on the other Solaris < 10 releases but I do not
> expect any difference in the outcome.
>

I've finished testing 2.8.1 and I found one more case where a null is being printed and causing a segfault. This happens even on Solaris 8 and 9. The failling test is t3200.63.

Here is the backtrace from a Solaris 8/SPARC machine:
(gdb) core trash directory.t3200-branch/core
[New LWP 1]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Core was generated by `/export/home/tgc/buildpkg/git/src/git-2.8.1/git 
branch --unset-upstream'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xfecb32cc in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0  0xfecb32cc in strlen () from /usr/lib/libc.so.1
#1  0xfed06508 in _doprnt () from /usr/lib/libc.so.1
#2  0xfed08690 in vfprintf () from /usr/lib/libc.so.1
#3  0x001487bc in vreportf (prefix=<optimized out>, err=<optimized out>, 
params=0xffbfe408) at usage.c:23
#4  0x0014881c in die_builtin (err=0x198f90 "Could not set '%s' to 
'%s'", params=0xffbfe408) at usage.c:35
#5  0x00148934 in die (err=0x198f90 "Could not set '%s' to '%s'") at 
usage.c:108
#6  0x000af1b0 in git_config_set_multivar_in_file (value=0x0, 
key=0x1ecca0 "branch.master.remote",
     config_filename=<optimized out>, value_regex=<optimized out>, 
multi_replace=<optimized out>) at config.c:2226
#7  git_config_set_multivar_in_file (config_filename=0x0, key=0x1ecca0 
"branch.master.remote", value=0x0,
     value_regex=0x0, multi_replace=1) at config.c:2220
#8  0x0003aa6c in cmd_branch (argc=0, argv=0xffbfec00, prefix=<optimized 
out>) at builtin/branch.c:793
#9  0x000255e8 in run_builtin (argv=0xffbfec00, argc=2, p=0x1c365c 
<commands+84>) at git.c:353
#10 handle_builtin (argc=2, argv=0xffbfec00) at git.c:540
#11 0x00168ecc in run_argv (argv=0xffbfeb30, argcp=0xffbfebdc) at git.c:594
#12 main (argc=2, av=<optimized out>) at git.c:701
(gdb)
-tgc
Previous: Tom G. ChristensenNext: Jeff King
Message 9 of 17 in “git segfaults on older Solaris releases”
  1. Tom G. ChristensenApr 7, 2016
  2. Junio C HamanoApr 7, 2016
  3. Junio C HamanoApr 7, 2016
  4. David TurnerApr 7, 2016
  5. Jeff KingApr 7, 2016
  6. Junio C HamanoApr 7, 2016
  7. Jeff KingApr 7, 2016
  8. Tom G. ChristensenApr 7, 2016
  9. Tom G. ChristensenApr 9, 2016
  10. Jeff KingApr 9, 2016
  11. 1/3 config: lower-case first word of error stringsJeff King, Apr 9, 2016
  12. 2/3 git_config_set_multivar_in_file: all non-zero returns are errorsJeff King, Apr 9, 2016
  13. 3/3 git_config_set_multivar_in_file: handle "unset" errorsJeff King, Apr 9, 2016
  14. Tom G. ChristensenApr 9, 2016
  15. Jeff KingApr 9, 2016
  16. Patrick SteinhardtApr 12, 2016
  17. Tom G. ChristensenApr 7, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.