diff options
| author | Paul Eggert | 2013-05-05 21:52:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-05-05 21:52:00 -0700 |
| commit | 5ee94506f6ee4f5142bfeabc9409f95e370d38e3 (patch) | |
| tree | 929f38ea53bd29b1b3141a5d09bfcafa0bb1e8f7 /src/ChangeLog | |
| parent | dc4a2ee0efe25b03973ea5feb5de9e46560a8127 (diff) | |
| download | emacs-5ee94506f6ee4f5142bfeabc9409f95e370d38e3.tar.gz emacs-5ee94506f6ee4f5142bfeabc9409f95e370d38e3.zip | |
* unexelf.c: Fix some 32-bit integer problems, notably when debugging.
Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
Verify that ElfW (Half) fits in int.
(fatal): Use same signature as lisp.h.
(UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
configure and build with -DUNEXELF_DEBUG without worrying about
other modules that use DEBUG.
(DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
possibly-wide integers now uses it instead of plain fprintf.
(entry_address): New function, which avoids problems with 32-bit
overflow on 64-bit hosts.
(OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
(round_up): Don't assume the remainder fits in int.
(find_section): Use bool for boolean. Simplify debug code.
(unexec): Don't assume file sizes fit in int or size_t.
Omit unnecessary trailing newline in 'fatal' format.
Use strerror rather than outputting decimal error number.
Remove unused code when emacs is not defined;
this file relies on Emacs now.
Don't assume e_phnum and e_shnum are positive.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 648a33a6fa1..b6ae117c8b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,26 @@ | |||
| 1 | 2013-05-06 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2013-05-06 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * unexelf.c: Fix some 32-bit integer problems, notably when debugging. | ||
| 4 | Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>. | ||
| 5 | Verify that ElfW (Half) fits in int. | ||
| 6 | (fatal): Use same signature as lisp.h. | ||
| 7 | (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can | ||
| 8 | configure and build with -DUNEXELF_DEBUG without worrying about | ||
| 9 | other modules that use DEBUG. | ||
| 10 | (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints | ||
| 11 | possibly-wide integers now uses it instead of plain fprintf. | ||
| 12 | (entry_address): New function, which avoids problems with 32-bit | ||
| 13 | overflow on 64-bit hosts. | ||
| 14 | (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it. | ||
| 15 | (round_up): Don't assume the remainder fits in int. | ||
| 16 | (find_section): Use bool for boolean. Simplify debug code. | ||
| 17 | (unexec): Don't assume file sizes fit in int or size_t. | ||
| 18 | Omit unnecessary trailing newline in 'fatal' format. | ||
| 19 | Use strerror rather than outputting decimal error number. | ||
| 20 | Remove unused code when emacs is not defined; | ||
| 21 | this file relies on Emacs now. | ||
| 22 | Don't assume e_phnum and e_shnum are positive. | ||
| 23 | |||
| 3 | * regex.c: Fix problems when DEBUG is defined. | 24 | * regex.c: Fix problems when DEBUG is defined. |
| 4 | (extract_number, extract_number_and_incr): Define regardless of | 25 | (extract_number, extract_number_and_incr): Define regardless of |
| 5 | whether DEBUG is defined; that's simpler and makes the code less | 26 | whether DEBUG is defined; that's simpler and makes the code less |