Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/vtlongline/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


vt could allocate more than 2MB thus running over it's 2MB reserved
heap and stepping on the shared segment.  testcase:

	; vt
	; aux/write
	draw: events: ecanread stat error: segments overlap

the executable is actually allocating 2.8MB:

	; ps -a|grep vt
	quanstro       4235    0:00   0:00     2824K Pwrite   vt
	quanstro       4236    0:00   0:00      168K Pread    vt
	quanstro       4237    0:00   0:00      168K Pread    vt
	quanstro       4238    0:00   0:00      172K Pread    vt
	quanstro       4240    0:00   0:00      172K Pread    vt
	quanstro       4250    0:00   0:00      156K Pread    grep vt

the solution is to let the system place the shared segment.  the
rest of the patch is to make all the errors consctl fatal; only a
random subset had been.

i think that telnetd/telnet have similar code, though i don't
see with grep that they call malloc.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.