| Summary: | savecore dumps core at boot | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Jimmy Olgeni <olgeni> |
| Component: | bin | Assignee: | Adrian Chadd <adrian> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Jimmy Olgeni
2000-11-16 10:30:01 UTC
I found the reason of savecore's core dump problem(PR bin/22886). [Reason] See compile log in src/sbin/savecore. `ld' reports the symbol conflict `dirname'. In savecore.c, dirname symbol is local pointer of char. In libc/gen/dirname.c, dirname symbol is function. --- Log misao% make cc -O -pipe -I/usr/SRC/src/sbin/savecore/../../usr.bin/compress -c /usr/SRC/src/sbin/savecore/savecore.c cc -O -pipe -I/usr/SRC/src/sbin/savecore/../../usr.bin/compress -c /usr/SRC/src/sbin/savecore/../../usr.bin/compress/zopen.c cc -O -pipe -I/usr/SRC/src/sbin/savecore/../../usr.bin/compress -static -o savecore savecore.o zopen.o /usr/libexec/elf/ld: Warning: size of symbol `dirname' changed from 4 to 206 in dirname.o /usr/libexec/elf/ld: Warning: type of symbol `dirname' changed from 1 to 2 in dirname.o gzip -cn /usr/SRC/src/sbin/savecore/savecore.8 > savecore.8.gz --- Log [Quick Hack] Apply below patch to src/sbin/savecore/savecore.c. --- patch diff -d -u -r1.28.2.3 savecore.c --- savecore.c 2000/07/04 01:17:47 1.28.2.3 +++ savecore.c 2000/11/16 11:12:25 @@ -108,7 +108,7 @@ int dumpsize; /* amount of memory dumped */ char *kernel; -char *dirname; /* directory to save dumps in */ +static char *dirname; /* directory to save dumps in */ char *ddname; /* name of dump device */ dev_t dumpdev; /* dump device */ int dumpfd; /* read/write descriptor on char dev */ --- patch -- Akio Morita Responsible Changed From-To: freebsd-bugs->adrian adrian is asking jkh for approval to fix this bug. State Changed From-To: open->closed Fixed in rev 1.28.2.4 of src/sbin/savecore.c . Thanks! |