GNU bug report logs -
#30785
Man pages truncated, repeated
Previous Next
Full log
Message #89 received at 30785 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> (libs/libgroff/localcharset.c's locale_charset looks overly complicated, WTF?)
Oh dear... relocatep.cpp is not much better, here is the offending function:
--8<---------------cut here---------------start------------->8---
// Strip the installation prefix and replace it
// with the current installation prefix; return the relocated path.
char *relocatep(const char *path)
{
#if DEBUG
fprintf(stderr, "relocatep: path = %s\n", path);
fprintf(stderr, "relocatep: INSTALLPATH = %s\n", INSTALLPATH);
fprintf(stderr, "relocatep: INSTALLPATHLEN = %d\n", INSTALLPATHLEN);
#endif
if (!curr_prefix)
set_current_prefix();
if (strncmp(INSTALLPATH, path, INSTALLPATHLEN))
return strsave(path);
char *relative_path = (char *)path + INSTALLPATHLEN;
size_t relative_path_len = strlen(relative_path);
char *relocated_path = new char[curr_prefix_len + relative_path_len + 1];
strcpy(relocated_path, curr_prefix);
strcat(relocated_path, relative_path);
#if DEBUG
fprintf(stderr, "relocated_path: %s\n", relocated_path);
#endif /* DEBUG */
return relocated_path;
}
--8<---------------cut here---------------end--------------->8---
I don't even get the use case of the function... From locale_charset, it seems
that the argument is LIBDIR.
So maybe INSTALLPATH and/or LIBDIR is not properly set when we compile groff.
> Maybe argv[0] is still the cause, but try setting the environment variable
> LC_ALL to "C" to disable locales before invoking "man". Does this make it not
> crash?
This works indeed! Can you see a fix then?
--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 4 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.