From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#30785: Man pages truncated, repeated Date: Mon, 14 Jan 2019 18:46:00 +0100 Message-ID: <20190114184600.2ba0df7b@scratchpost.org> References: <87va2s8row.fsf@ambrevar.xyz> <87tvic8rfq.fsf@ambrevar.xyz> <878szo5w6z.fsf@gnu.org> <87r2dg8nxd.fsf@ambrevar.xyz> <87pnt08ndl.fsf@ambrevar.xyz> <8736pw5mmh.fsf@gnu.org> <87muo48fay.fsf@ambrevar.xyz> <87r2dfy6t0.fsf@gnu.org> <87k1j78vzd.fsf@ambrevar.xyz> <87imyr8rsg.fsf@ambrevar.xyz> <87ef9f8ei5.fsf@ambrevar.xyz> <87a7k3rzio.fsf@gnu.org> <87won78aw8.fsf@ambrevar.xyz> <20190114174240.557e64b5@scratchpost.org> <87va2r89ef.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/hQaX=z0YSLs=Z75=.eV8zXO"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj6KH-0005mg-TC for bug-guix@gnu.org; Mon, 14 Jan 2019 12:47:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj6KH-0000rg-0T for bug-guix@gnu.org; Mon, 14 Jan 2019 12:47:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60011) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gj6KF-0000qw-If for bug-guix@gnu.org; Mon, 14 Jan 2019 12:47:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gj6KE-0001pm-D4 for bug-guix@gnu.org; Mon, 14 Jan 2019 12:47:03 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87va2r89ef.fsf@ambrevar.xyz> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 30785@debbugs.gnu.org --Sig_/hQaX=z0YSLs=Z75=.eV8zXO Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Pierre, On Mon, 14 Jan 2019 17:57:12 +0100 Pierre Neidhardt wrote: > > (libs/libgroff/localcharset.c's locale_charset looks overly complicated= , WTF?) =20 >=20 > Oh dear... relocatep.cpp is not much better, here is the offending functi= on: >=20 > --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 =3D %s\n", path); > fprintf(stderr, "relocatep: INSTALLPATH =3D %s\n", INSTALLPATH); > fprintf(stderr, "relocatep: INSTALLPATHLEN =3D %d\n", INSTALLPATHLEN); > #endif > if (!curr_prefix) > set_current_prefix(); > if (strncmp(INSTALLPATH, path, INSTALLPATHLEN)) > return strsave(path); > char *relative_path =3D (char *)path + INSTALLPATHLEN; > size_t relative_path_len =3D strlen(relative_path); > char *relocated_path =3D 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--- >=20 > I don't even get the use case of the function... From locale_charset, it= seems > that the argument is LIBDIR. It's used inside get_charset_aliases, which reads the file "charset.alias". We have only one alias in our file "charset.alias" (in GuixSD), so let's try ignoring it completely for now. What happens if you don't mess with LC_ALL but set the environment variable CHARSETALIASDIR to "/does_not_exist" ? > Can you see a fix then? If the avove also works, we can just patch get_charset_aliases to always re= turn the empty string (or a string literal). The one alias we do have in "charset.alias" is: ISO_646.IRV:1983 ASCII Alternatively, we could patch get_charset_aliases so it always takes our charset.alias from our libiconv (without get_charset_aliases calling "relocate"). Still it would be interesting to find the Segmentation fault (that's not supposed to ever happen). --Sig_/hQaX=z0YSLs=Z75=.eV8zXO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlw8ytgACgkQ5xo1VCww uqWIkggAgsjG/kijvzd5jJOoGOamFkICCFK77wMYepSfQBkSeAqzr0uaPWHcEYxs 6KQ1kpXDuPFl1laTJ5DvwcdfZttC6grW2pVI13bQii5f65pKxvES+FPQsH8MzbAK MD04aDzn7ZKyeTmqw18QQVg0rw/5NWixyq/Cnt3mr8wvcbvNPxMGrOnvxIPFi8CO s/1uHVy7uuOf2G5ZzY3grt8Hi410aSbsuyMq2nNkqS5+c0V/KP4yaJjtXeIuTF0G 0QMbeN6TMqqiv9hQKhPNSbulEg/6WGvraG1/3lmE7i9z3mTJehiaujjik96Jr2EP ckmGO1Xat8ol3BxRwlelgk1xXrDiOg== =JvOe -----END PGP SIGNATURE----- --Sig_/hQaX=z0YSLs=Z75=.eV8zXO--