[3364] in Athena Bugs
(RT/PC) Version 6.3B: attach
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Thu Oct 5 09:37:04 1989
Date: Thu, 5 Oct 89 09:36:40 -0400
From: Jonathan I. Kamens <jik@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
System type, version: (RT/PC) Version 6.3B
System name: bill-the-cat
What's wrong:
The source code to attach has several calls to malloc which are
not checked for successful completion before the memory that was
supposedly allocated by malloc is used. This causes a seg fault
if memory is scarce on the workstation, as we have been
encountering so often during the new release, and a malloc that
attach performs doesn't work.
What should have happened:
Attach should check each call to malloc immediately after it is
executed to verify that the memory was indeed allocated. I have
done a rudimentary scan of the sources files for "alloc" and
fixed all of the improper calls to malloc that I could find. You
will find a context diff patch file in:
/afs/sipb/user/jik/cores/rt/attach/source/diff
Please let me know when someone who can/will do something about
that has copied the patch file and/or no longer needs it so that
I can delete the sources from my directory -- I'm short on space.
Note: The current version of attach does this when it can't
malloc:
Segmentation Violation (core dumped)
The fixed version compiled in the directory mentioned above does
this instead:
Can't malloc while parsing attachtab: Not enough memory
Operation aborted
jik