9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rminnich@gmail.com (ron minnich)
Subject: [9fans] problem with rminnich's 9vx
Date: Tue, 29 Mar 2011 08:16:51 -0700	[thread overview]
Message-ID: <AANLkTik7iuYhrjnOTDV1DOr9m-zU2LZa-3qSdF_Ykgo_@mail.gmail.com> (raw)
In-Reply-To: <11e5bc89749dfdd2bee8cf4ecd94f52c@smgl.homelinux.net>

This one is extremely weird.

On Tue, Mar 29, 2011 at 2:00 AM, Mathieu Lonjaret
<mathieu.lonjaret at gmail.com> wrote:
> Hi all,
>
> this is probably trivial; this is what I get when trying to start 9vx:
>
> Warning! factotum can't protect itself from debugging: '#p/5' file does not exist
> init: warning: can't open #p/2/ctl: '#p/2' file does not exist

If #p does not work, well! things are seriously wrong. Do you ever get
an rc prompt?

Oh, I see; it's the ubuntu + sprintf problem. I should have taken
Christoph's patch, sorry about that; my fault.

As to your other questions. There's no real reason to build 9vx as a
64-bit binary, and it causes a lot of headaches, so I stick with a
32-bit version nowadays; also, I build all my binaries using my
sysfromiso repo as a starting point. In fact I build all my arm
kernels on 9vx using sysfromiso and use 9vx as the server for the root
file system for the ARMs. In spite of everything I much prefer hg to
replica.

We need a better way to keep 9vx going than just "Ron's version" or
"Joe's version" or whatever. Certainly patches should not just be
directed to me. I don't see the harm in bringing the discussions to
this list.

Here's the patch in question.

 sprint(char *buf, char *fmt, ...)
 {
 	int n;
-	uint len;
 	va_list args;

-	len = 1<<30;  /* big number, but sprint is deprecated anyway */
-	/*
-	 * on PowerPC, the stack is near the top of memory, so
-	 * we must be sure not to overflow a 32-bit pointer.
-	 */
-	if(buf+len < buf)
-		len = -(uintptr)buf-1;
-
 	va_start(args, fmt);
-	n = vsnprint(buf, len, fmt, args);
+	n = vsnprint(buf, 65536, fmt, args);
 	va_end(args);
 	return n;
 }

Note the len = 1 << 30; why was that ever done? I never figured that
out so was never sure about the implications of this patch. Anybody
know?

thanks

ron



  parent reply	other threads:[~2011-03-29 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29  9:00 Mathieu Lonjaret
2011-03-29  9:18 ` Noah Evans
2011-03-29  9:25   ` Mathieu Lonjaret
2011-03-29  9:33     ` Noah Evans
2011-03-29  9:47 ` yy
2011-03-29 11:49   ` Mathieu Lonjaret
2011-03-29 15:06 ` Christoph Lohmann
2011-03-29 15:42   ` Mathieu Lonjaret
2011-03-29 16:09     ` ron minnich
2011-03-29 16:20       ` Mathieu Lonjaret
2011-03-29 17:16         ` ron minnich
2011-03-29 20:25           ` Charles Forsyth
2011-03-29 20:16             ` ron minnich
2011-03-29 16:46       ` yy
2011-03-29 15:16 ` ron minnich [this message]
2011-03-29 16:44   ` Charles Forsyth
2011-03-29 17:00     ` Charles Forsyth
2011-03-29 19:05       ` erik quanstrom
2011-03-29 19:50         ` ron minnich
2011-03-29 20:20         ` Charles Forsyth
2011-03-29 20:55           ` erik quanstrom

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=AANLkTik7iuYhrjnOTDV1DOr9m-zU2LZa-3qSdF_Ykgo_@mail.gmail.com \
    --to=rminnich@gmail.com \
    /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).