Plexus P/40 System III Release 1.2 'C' compiler/library bug

Kevin Szabo ksbszabo at wateng.UUCP
Wed Mar 13 16:30:15 AEST 1985


In article <395 at aicchi.UUCP> ignatz at aicchi.UUCP (Ihnat) writes:
>	char buff[64];
>	setbuf(stdout,buff);
>
>Some boring poking with adb resulted in the not surprising
>fact that the stack and data were crawling down each other's
>throats; the only surprising thing was that this happened at all
>on such a small, simple program.  Has anyone else found this?

Setbuf expects the buffer to be BUFSIZ big. STDIO has no
way of finding out how big your buffer really is.
Reading the man page for SETBUF should clarify this.
Peeking at the source ain't bad either.

				Kevin
-- 
Kevin Szabo  watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)



More information about the Comp.unix.wizards mailing list