
Rogers at ISI
Sep 8, 1995, 4:32 PM
Post #1 of 1
(142 views)
Permalink
|
|
Bug in Perl 4.036 on Sequent
|
|
I recently installed perl-4.036 on a Sequent system to which I am porting some software. I'm not precisely certain what generation of the Sequent Operating System, Dynix, is being used, but the following messages appear as part of the login feedback and might offer trustworthy clues: UNIX System V Release 3.2.0 i386 ... DYNIX/ptx(R) V1.4.0 I encountered an error: accept() wasn't working. Debugging revealed that perl was passing a large value for the length of the sockaddr structure, and Dynix was rejecting that value. Apparently Dynix has more comprehensive error checks than standard Unix does. In file "doio.c", in the following code: do_accept(str, nstab, gstab) STR *str; STAB *nstab; STAB *gstab; { register STIO *nstio; register STIO *gstio; int len = sizeof buf; int fd; I replaced the initialization of "len" with: int len = sizeof (struct sockaddr); A more correct fix might initialize "len" to the minimum of "sizeof buf" and "sizeof (struct sockaddr)"; or, assert a compile-time error if "sizeof buf < sizeof (struct sockaddr)". Based on inspection of the code, Perl 5.001m's accept() call should operate as-is. Um, is there a file of known errors in perl-4.036 that I should have examined prior to submitting this report? Craig Milo Rogers
|