Re: git segfaults on older Solaris releases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/04/16 20:32, Junio C Hamano wrote:
"Tom G. Christensen" <tgc@xxxxxxxxxxxxxxx> writes:

The reason for the crash is simple, a null value was passed to the 's'
format for the *printf family of functions.
...
Passing a null value to the 's' format is explicitly documented as
giving undefined results on Solaris, even on Solaris 11(2).

Do you mean

	*printf("...%.*s...", ..., 0, NULL, ...)

i.e. you saw a NULL passed only when we use %.*s with width=0?


Maybe? Not sure what you're asking exactly.

I'm seing what is in the backtrace from gdb and that is prefix is NULL (0x0) which ends up being printed using some variant of '%s' after going through the various wrappers.

I hacked around it in run_builtin() as a proof and have also made some experiments with working around it in setup_git_directory_gently() which got me a bit further but it looks like there are places that do if(prefix) which now does not behave as expected because prefix is not NULL.

-tgc




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]