reproduce-devel
[Top][All Lists]
Advanced

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

[bug #60282] Git installation crashes in macOS after upgrading to Big Su


From: Boud Roukema
Subject: [bug #60282] Git installation crashes in macOS after upgrading to Big Sur
Date: Thu, 15 Jul 2021 13:50:43 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #1, bug #60282 (project reproduce):

Looking at git-2.28.0 that we have currently in Maneage, it looks like:

* line 69 of regex.c includes <regex.h>, which is normally used to mean a
system-level file (although I think the real rules are implementation is
system-dependent)
* lines 356, 357 of compat/regex/regex.h *only* define RE_TRANSLATE_TYPE if
__USE_GNU is true; otherwise only __RE_TRANSLATE_TYPE is defined
* line 70 of regex.c includes regex_internal.h
* line 394 of regex_internal.h refers to RE_TRANSLATE_TYPE

So failure is expected if:

(i) no system-level include file _regex.h_ is found, or (ii) if the system
_regex.h_ is found but it does not define RE_TRANSLATE_TYPE,

and

(iii) if __USE_GNU is false (e.g. undefined).

(i) should cause a compile error. So the bug appears to be (ii) + (iii).

It looks to me like the relevant code (all lines containing RE_TRANSLATE_TYPE)
are identical in git-2.26.2 (Maneage prior to b3b4479), git-2.28.0 and
git-2.32.0.


$ md5sum ../git-2.*/compat/regex/regex.h
f7f45f3dc1011d2635305c11a4cdb620  ../git-2.26.2/compat/regex/regex.h
f7f45f3dc1011d2635305c11a4cdb620  ../git-2.28.0/compat/regex/regex.h
f7f45f3dc1011d2635305c11a4cdb620  ../git-2.32.0/compat/regex/regex.h


It looks like _regex.h_ is a glibc header file, associated with glibc source
code or a compiled library, of course, e.g.

gnulib: /usr/share/gnulib/lib/regex.h
libc6-dev:amd64: /usr/include/regex.h

and it says on line 8 quite clearly that "This file is part of the GNU C
Library."

I can't judge if this is considered to be a bug in git or rather in
Darwin/xnu. My guess is that _git_ accepts the GNU approach, i.e. it is happy
to provide a backup in case the system-level _regex.h_ is missing, but
considers that if _regex.h_ does not define RE_TRANSLATE_TYPE and the system
is non-GNU, then it's better to have a compile failure than to guess what
RE_TRANSLATE_TYPE should be defined to.

The other missing types I see are _reg_errcode_t_ (an _enum_ type) and
_reg_syntax_t_ a macro related to syntax.

There's also _ret_ and _REG_NOERROR_.

I haven't checked if these are all defined as part of a POSIX standard.

The practical question is whether a hack to provide the _if __USE_GNU_
definitions as a fallback for a non-GNU system that fails to provide these
would be safe. Darwin/xnu presumably has its own (possibly secret, since the
system is generally not free) hack for compiling git - I can't believe that
git is not available as a binary install on a standard recent Darwin/xnu
system...


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?60282>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]