9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>
To: 9fans@cse.psu.edu
Subject: [9fans] Forwarded attachment...
Date: Fri, 19 Dec 2003 08:22:06 -0700	[thread overview]
Message-ID: <Pine.LNX.4.44.0312190820100.13780-200000@fbsd.cpsc.ucalgary.ca> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 292 bytes --]

This patch fixes links crashing terminals. I lost all my work from yesterday so I
couldn't get it on the web.

The problem isn't so bad if you have more memory (>= 512 with untouched
kernelpercent) where only links will crash. that's why we were able to debug
it yesterday...

andrey

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1116 bytes --]

I don't know whether that's the same bug, but links crashed on
nikkei.com due to a memcpy() being called with a nil second argument
in dns.c:49.  I've worked around it as follows:

	diff /n/dump/2003/1218/usr/andrey/src/links-ape/dns.c /usr/andrey/src/links-ape/dns.c
	47,48c47,49
	< 		nogethostbyaddr: if (!(hst = gethostbyname((char *)name)))
	< 			return -1;
	---
	> nogethostbyaddr:
	> 	if (!(hst = gethostbyname((char *)name)) || !hst->h_addr_list[0])
	> 		return -1;

also add this one:

	diff /n/dump/2003/1218/usr/andrey/src/links-ape/config.h /usr/andrey/src/links-ape/config.h
	22a23
	> #define HAVE_GETHOSTBYADDR 1

Can you verify if this fixes links' crashing?

The problem with nikkei not displaying proper fonts is because they're
using Shift_GIS encoding, which Links doesn't know how to handle.  I
should port lunix' "iconv" which knows everything there is to know
about encodings, and will make links use that instead of its own
(limited) conversion tables, then it'll handle Shift_JIS and many more
sites as it should.

That won't happen immediately, though...

andrey

             reply	other threads:[~2003-12-19 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-19 15:22 andrey mirtchovski [this message]
2003-12-18 22:31 ` Russ Cox
2003-12-19 17:21   ` mirtchov
2003-12-19 22:40     ` David Presotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0312190820100.13780-200000@fbsd.cpsc.ucalgary.ca \
    --to=mirtchov@cpsc.ucalgary.ca \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).