🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12566

Re: /usr/ucb/lpr Out of Memory

#12566
From: Graham D. Parrington
Date: Sat, 06 May 1989 13:00
23 lines
1946 bytes
Aha! Someone else has come across this problem - we found it a couple of
weeks ago - however, you need source to fix it (maybe you can be clever
with the binary but we did not try it). The problem is lpr itself - it
includes a routine called mktemp (that is the same name as a library
routine) but which takes a different number of parameters to the library
routine. Unfortunately lpr calls 'getwd' which tries to call the library
version of 'mktemp' - guess which version it really gets....  The net
result of this is that the lpr version of 'mktemp' only gets supplied with
one parameter when it wants three -it picks up trash of the stack for the
rest and depending upon what these are lpr fails with an out of memory
error.  The solution is to rename the internal version so that it's name
doesn't class with a library name (we used lprmktemp). Another solution
that could work if you've the disk space for it is to up the swap space -
we found that in general the presumably arbitrary values on the stack
caused a malloc request for about 24Mb.  We've reported our findings to
Sun UK so expect a genuine fix at some point in the future.

Graham Parrington, Computing Laboratory, University of Newcastle upon Tyne, UK

JANET = Graham.Parrington@uk.ac.newcastle
ARPA  = Graham.Parrington@newcastle.ac.uk
UUCP  = ...!ukc!newcastle.ac.uk!Graham.Parrington
PHONE = +44 91 222 8067
Technical Details
Message-ID: <AA10047.8904250814.linden@uk.ac.newcastle>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: Graham.Parrington%newcastle.ac.uk@nsfnet-relay.ac.uk (Graham D. Parrington)
Newsgroups: comp.sys.sun
Subject: Re: /usr/ucb/lpr Out of Memory
Keywords: Software
Message-ID: <AA10047.8904250814.linden@uk.ac.newcastle>
Date: 6 May 89 13:00:10 GMT
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 23
Approved: Sun-Spots@rice.edu
Original-Date: Tue, 25 Apr 89 9:14:02 BST
X-Sun-Spots-Digest: Volume 7, Issue 272, message 3 of 19