| Summary: | limit coredumpsize 0, but dumps Zero Size Core File | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Higashi.Hiroyuki <Higashi.Hiroyuki> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Duplicate of PR 14540. |
I set "limit coredumpsize 0". But kernel dumps "Zero Size Core File". Fix: at kern_sig.c of coredump() before call "p->p_sysent->sv_coredump(p, vp, limit)" check "limit" size Ex. ----- 1393 error = (limit & p->p_sysent->sv_coredump) ? 1394 p->p_sysent->sv_coredump(p, vp, limit) : 1395 ENOSYS; ----- How-To-Repeat: Test Program source is below.(This file name is "foo.c".) ----- main(void) { int a; a = 1/0; } ----- Compile this source program. And execute it. ----- % limit coredumpsize 0 % cc foo.c % a.out Floating point exception % ls -l a.out* -rwxrwxr-x 1 higashi TR 3093 Nov 2 19:13 a.out -rw------- 1 higashi TR 0 Nov 2 19:13 a.out.core ----- Other version of FreeBSD DOSE NOT DUMP core file.