From: Jeff Odom <zeus@jhu.edu>
Subject: Re: lpd memory violations
Date: Sun, 1 Dec 1996 22:51:43 -0500 (EST) [thread overview]
Message-ID: <1691109527f91e23b0a18a8231988091.axp-list@archive.invalid> (raw)
In-Reply-To: <199612012222.PAA02989@ellpspace.math.ualberta.ca>
> >
> > lpd calls __ivaliduser to check if a host is in either
> > /etc/hosts.equiv or /etc/hosts.lpr. The way it calls it is:
> >
> > __ivaliduser(fd, hostname, DUMMY, DUMMY, baselen)
> >
> > However, when called, all it gives is a line
> > that goes something like:
> >
> > memory violation at pc=155556bfa20 rp=155556beba0 (bad address = 00000000)
>
> I do not have sources handy, but you have 99% chance that this problem
> is caused by passing to __ivaliduser long, or pointer, where it
> expects int, or vice-versa. __invaliduser may "know", for example,
> that 'int' is long enough to keep length of a baselen but gets something
> of size_t type and the whole stack gets out of whack. If you do not
> have sources to __ivaliduser, and nobody will volunteer with a
> prototype, then tracing the call in a debugger is likely the only
> option (and probably on an assembler level - grrr ...).
Yeesh. I just rewrote the section that uses it with my own function. I'll
figure out __ivaliduser() later...actually, I think that rlogin/rsh uses
it as well, as hosts.equiv is used by both rlogin and lpd. Something else
to work on, I guess.
> As long as __ivaliduser is not totally hosed and does not truncate
> pointers to 32-bits thing can be likely rescued by a few casts on
> call arguments.
>
> Good luck,
> Michal
Thanks. Actually, I got lpd to finally work. It seems there was another
bug, this time in printjob.c. The function status() seems to do varargs
incorrectly (I don't think gcc likes k&r style very much), so I got an
additional error with sprintf there too. The interesting thing is, the
executable that comes with lpr-0.12.1 doesn't blow up there, but the
executable that results from compiling the source does. If I figure out
what's exactly wrong with __ivaliduser, I'll post a patch.
>
> P.S. An attempt to send mail directly to the original poster fails
> with this interesting, ahem, error :-)
Actually, that seems to have come from having my NFS server knocked off
the network, so filter couldn't write to my mail file. I just love
centralized networks, don't you? :)
Jeff
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next prev parent reply other threads:[~1996-12-02 3:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.3.95.961130190432.5883B-100000@wehsal.mb.jhu.edu>
1996-12-01 22:22 ` lpd memory violations Michal Jaegermann
1996-12-02 3:51 ` Jeff Odom [this message]
1996-12-02 15:48 Przemek Klosowski
-- strict thread matches above, loose matches on Subject: below --
1996-12-02 4:28 Przemek Klosowski
1996-12-01 0:12 Jeff Odom
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox