Omitting heap section from Core dump file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I have modified the file "Linux-src/fs/binfmt_elf.c" having function
'maydump ()' to omit/discard all anonymous segments while taking core
dump of a process. Below is my changes in the function 'maydump ()':

    if ((vma->vm_file == NULL) && (vma->vm_flags & 0x0100073))
    {
        if (vma->vm_start > 0x7fff00000000) /* will dump stack segment */
            return 1;
        printk(KERN_ERR "\nVMA Not Dumped: VMA Start 0x%lx SIZE %u",
vma->vm_start, (vma->vm_end - vma->vm_start));
        return 0;
    }

I'm testing the above changes in x86_64 architecture having 8 CPU's.

The above changes will work fine for core files which will be
generated when the test program receives SIGSEGV while executing the
instructions from its own code segment. (The instruction executed is
not part of any library)

And when the program receives SIGSEGV, during execution of library
routine then the generated core file will not properly list the stack
frames, when i issue 'bt' command on the core file. And also the
symbols are missing from the out put of 'bt' command.

Does the library call set up a separate stack area for their execution?
Any thoughts or suggestions are highly appreciated.

--Regards,
rajesh
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux