core dumps on Linux/Alpha

Thomas Bogendoerfer (tsbogend@alpha.franken.de)
Fri, 22 May 1998 12:52:35 +0200


Hi,

after getting 2.1.102 stable on my machine, I found another problem.
While ulimit -c unlimited worked well for 2.1.33, it doesn't generate
a core dump with 2.1.102. Below is a patch which fixes it for me. More
strange is the fact, that 2.1.102 doesn't create core dumps for processes
started by root. I guess this it due to the capabilty changes, but
is the default to not generate core dumps for root (even with ulimit -c)
the right default ? Or is this another Alpha only problem ?

Thomas.

Index: binfmt_elf.c
===================================================================
RCS file: /usr/src/cvs/linux/fs/binfmt_elf.c,v
retrieving revision 1.1.1.36
diff -u -r1.1.1.36 binfmt_elf.c
--- binfmt_elf.c 1998/05/11 19:42:10 1.1.1.36
+++ binfmt_elf.c 1998/05/22 08:33:28
@@ -1054,7 +1054,7 @@
struct vm_area_struct *vma;
struct elfhdr elf;
off_t offset = 0, dataoff;
- int limit = current->rlim[RLIMIT_CORE].rlim_cur;
+ long limit = current->rlim[RLIMIT_CORE].rlim_cur;
int numnote = 4;
struct memelfnote notes[4];
struct elf_prstatus prstatus; /* NT_PRSTATUS */

-- 
See, you not only have to be a good coder to create a system like Linux,
you have to be a sneaky bastard too ;-)
                   [Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]