]> git.ipfire.org Git - thirdparty/git.git/commit - Makefile
Makefile: add a note about the NO_MMAP setting on IRIX and IRIX64
authorBrandon Casey <drafnel@gmail.com>
Fri, 9 Oct 2009 00:09:37 +0000 (19:09 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Oct 2009 05:55:25 +0000 (22:55 -0700)
commit651aef3428d9688e3fdffc6760380ead47debb9f
tree6a526e4419823b8a7cef7f841989f5149e071068
parent817350d3af9e1227c737e47ff79f65f0373b31d6
Makefile: add a note about the NO_MMAP setting on IRIX and IRIX64

When git is compiled with the MIPSpro 7.4.4m compiler, and NO_PTHREADS is
set, and NO_MMAP is _not_ set, then git segfaults when trying to access the
first entry in a reflog.  If NO_PTHREADS is not set (which implies that the
pthread library is linked in), or NO_MMAP _is_ set, then the segfault is
not encountered.  The conservative choice has been made to set NO_MMAP in
the Makefile to avoid this flaw.  The GNU C compiler does not produce this
behavior.

The segfault happens in refs.c:read_ref_at().  The mmap succeeds, and the
loop is executed properly until rec is rewound into the first line (reflog
entry) of the file.  The segfault is caught by test 28 of
t1400-update-ref.sh which fails when 'git rev-parse --verify "master@{May 25
2005}"' is called.

So, add a comment in the Makefile to describe why NO_MMAP is set and as a
hint to those who may be interested in unsetting it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile