I want to avoid dumping some information from my program in a core file in case of any accident.
For this, I can use coredump_filter ()
The man page provides the following details
The file has a little mask of value memory mapping types (See mmap (2)). If a bit is set in the mask, then similar memory mapping is omitted; Otherwise they are not left in the bits of this file the following meanings:
Dump unnamed anonymous confidential mapping. Bit 1 anonymous shared mapping dump bit 2 dump file-backed private mapping bit3 dump file-supported shared mapping bit 4 (since linux 2.6.24) dump ELF heading bit 5 (since Linux 2.6.28) Private huge Dump pages. Bit 6 (Linux since 2.6.28) Dump shared huge pages.
I want to know which set and reset will be done in my case. I am not particularly clear from these private and shared areas.
I have buffer (unsigned char *) in memory I do not want to throw it in a core file in case of any accident. Is there any special flag that I want to use for the mmap? Please help. thank you in advanced.
No comments:
Post a Comment