gethostbyname() crash in pl 4.035 under SunOS 4.1.? 
Author Message
 gethostbyname() crash in pl 4.035 under SunOS 4.1.?

doio.c, lines 1738-1744 read as follows:

            if (which == O_GHBYNAME) {
#ifdef h_addr
                str_nset(str, *hent->h_addr, hent->h_length);
#else
                str_nset(str, hent->h_addr, hent->h_length);
#endif

Sun's <netdb.h> defines h_addr as
#define h_addr  h_addr_list[0]  /* address, for backward compatiblity */

h_addr_list is dereferenced by both <netdb.h> and perl, which results
in a char being passed to str_nset.  I've no idea which is at fault.
The obvious quick fix works.


 WARNING: article may contain flammable material.  Do not expose to open
   flames.  In case of accidental ignition, douse keyboard with water.



Fri, 03 Mar 1995 09:50:59 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Perl program crashes SparcStation running SunOS 4.1

2. Coredumps from gethostbyname() (4.035)

3. perl crashed on 4.1

4. Compiling 4.035 w/ gcc-2.2.2 under SunOS 4.1.2

5. perl 4.035 on SunOS 5.0???

6. Perl 4.036 on SunOS 4.1 fails make test

7. SunOS 4.1 cc -O loses on perl (4.033) util.c

8. Problem installing Perl 4.010 on Sun 3 SunOS 4.1

9. Segmentation fault on a sun4_65c, SunOS 4.1 with perl 4.0

10. 4.0 core dumps when starting debugger (sunos 4.1)

11. Compile errors for perl under SunOS 4.1

12. perl on sunos 4.1

 

 
Powered by phpBB® Forum Software