home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9267 < prev    next >
Encoding:
Text File  |  1992-09-01  |  3.1 KB  |  117 lines

  1. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!hal.gnu.ai.mit.edu!mycroft
  2. From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: AIX 3.2.2 and amd
  5. Message-ID: <1992Sep1.181754.26655@mintaka.lcs.mit.edu>
  6. Date: 1 Sep 92 18:17:54 GMT
  7. References: <5396@unixhub.SLAC.Stanford.EDU>
  8. Sender: news@mintaka.lcs.mit.edu
  9. Organization: /etc/organization
  10. Lines: 105
  11.  
  12.  
  13. In article <5396@unixhub.SLAC.Stanford.EDU>
  14. joann@unixhub.slac.stanford.edu writes:
  15. >
  16. > We are now trying to bring up 3.2.2, and are having trouble with amd.
  17. > Is anyone else running it?
  18.  
  19. I'm not sure whether you're talking about `amd' or really about
  20. `automount' here.  If `amd', then you probably need two patches I
  21. recently sent to the amd-workers list:
  22.  
  23.  
  24. From: mycroft@gnu.ai.mit.edu
  25. Message-Id: <9208261848.AA22775@hal.gnu.ai.mit.edu>
  26. Subject: Patch to 5.3beta1; memory used after being free()d
  27. To: amd-workers@acl.lanl.gov
  28. Date: Wed, 26 Aug 92 14:48:55 EDT
  29.  
  30.  
  31. The following patch fixes a condition where amd was free()ing memory
  32. and then using it immediately.  This was causing it to dump core on
  33. some systems with finicky malloc()s.
  34.  
  35. Also, config/os-aix3.h should #include <sys/time.h> for AIX 3.2.
  36.  
  37. -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
  38. *** amd/afs_ops.c.orig    Sun May 31 12:36:42 1992
  39. --- amd/afs_ops.c    Wed Aug 26 14:28:59 1992
  40. ***************
  41. *** 1537,1544 ****
  42.           return new_mp;
  43.       }
  44.   
  45. !     if (error && (cp->mp->am_mnt->mf_ops == &efs_ops))
  46. !         cp->mp->am_error = error;
  47.   
  48.       assign_error_mntfs(new_mp);
  49.   
  50. --- 1537,1544 ----
  51.           return new_mp;
  52.       }
  53.   
  54. !     if (error && (new_mp->am_mnt->mf_ops == &efs_ops))
  55. !         new_mp->am_error = error;
  56.   
  57.       assign_error_mntfs(new_mp);
  58.   
  59. -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
  60.  
  61.  
  62. From: mycroft@gnu.ai.mit.edu
  63. Message-Id: <9208270802.AA55732@hal.gnu.ai.mit.edu>
  64. Subject: Another bug in 5.3beta1
  65. To: amd-workers@acl.lanl.gov
  66. Date: Thu, 27 Aug 92 4:02:35 EDT
  67.  
  68.  
  69. The old version of str3cat() interacted badly with the mnt_dup() in
  70. mtab_aix.c.  The following patch fixes this by just having str3cat()
  71. use xmalloc() rather than xrealloc().  I don't see any good reason not
  72. to have it work this way.
  73.  
  74. (I don't know of any more bugs at the moment.)
  75.  
  76. -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
  77. *** util.c.orig    Sat Mar  7 12:51:42 1992
  78. --- util.c    Thu Aug 27 03:52:32 1992
  79. ***************
  80. *** 79,92 ****
  81.   char *s2;
  82.   char *s3;
  83.   {
  84.       int l1 = strlen(s1);
  85.       int l2 = strlen(s2);
  86.       int l3 = strlen(s3);
  87. !     p = (char *) xrealloc(p, l1 + l2 + l3 + 1);
  88. !     bcopy(s1, p, l1);
  89. !     bcopy(s2, p + l1, l2);
  90. !     bcopy(s3, p + l1 + l2, l3 + 1);
  91. !     return p;
  92.   }
  93.   
  94.   char *strealloc(p, s)
  95. --- 79,94 ----
  96.   char *s2;
  97.   char *s3;
  98.   {
  99. +     char *new_p;
  100.       int l1 = strlen(s1);
  101.       int l2 = strlen(s2);
  102.       int l3 = strlen(s3);
  103. !     new_p = (char *) xmalloc(l1 + l2 + l3 + 1);
  104. !     bcopy(s1, new_p, l1);
  105. !     bcopy(s2, new_p + l1, l2);
  106. !     bcopy(s3, new_p + l1 + l2, l3 + 1);
  107. !     free(p);
  108. !     return new_p;
  109.   }
  110.   
  111.   char *strealloc(p, s)
  112. -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
  113.  
  114. -- 
  115.  \   Charles Hannum, mycroft@ai.mit.edu
  116.  /\  White heterosexual atheist male (WHAM) pride!
  117.