aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorPaul Eggert2013-05-05 21:52:00 -0700
committerPaul Eggert2013-05-05 21:52:00 -0700
commit5ee94506f6ee4f5142bfeabc9409f95e370d38e3 (patch)
tree929f38ea53bd29b1b3141a5d09bfcafa0bb1e8f7 /src/bytecode.c
parentdc4a2ee0efe25b03973ea5feb5de9e46560a8127 (diff)
downloademacs-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/bytecode.c')
0 files changed, 0 insertions, 0 deletions