home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp / 10177 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.2 KB  |  30 lines

  1. Path: sparky!uunet!olivea!spool.mu.edu!sdd.hp.com!cs.utexas.edu!ut-emx!tivoli!TIVOLI.COM!stuart
  2. From: stuart@TIVOLI.COM (Stuart Jarriel)
  3. Newsgroups: comp.sys.hp
  4. Subject: xdr_array()  possible problem?
  5. Message-ID: <3923@tivoli.UUCP>
  6. Date: 9 Sep 92 01:34:00 GMT
  7. Sender: news@tivoli.UUCP
  8. Organization: Tivoli Systems, Inc
  9. Lines: 19
  10.  
  11.  
  12. We have an application that uses xdr_array() a LOT! and passes in a NULL
  13. struct so that xdr_array() will allocate the storage.  Well, in some 
  14. cases we are finding that we SEGV when we free the storage that xdr_array()
  15. allocated.  
  16.  
  17. Now it is entirely possible that our application (still early in debug) is
  18. stepping on the stack somehow, but I have source to xdr_array() that works
  19. just fine (if I replace the one from HPUX).  
  20.  
  21. So my question is:?  Does HPUX do ANY storage tricks inside xdr_array() 
  22. WRT to allocating storage (if *array == NULL).  Tricks here would include
  23. anything OTHER than allocating (# of elements * element_size) from BSS.
  24. I only see the problem when I ask for # of elements = 1 or 2.  So I was
  25. hoping that with a small enough # the HPUX might be (in bad form) giving 
  26. me static storage instead of alloc'ing the space.
  27.  
  28. Just hoping....
  29. stuart
  30.