diff options
| author | Paul Eggert | 2012-05-26 15:27:21 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-05-26 15:27:21 -0700 |
| commit | c1892f1145dd05df037fc580acc5616f6d164238 (patch) | |
| tree | f56ded1081fc8c09076df37b41e7abe844380410 /src/ChangeLog | |
| parent | 38264cc938d9f2fb63f1697b4ec3dc9b86640e5f (diff) | |
| download | emacs-c1892f1145dd05df037fc580acc5616f6d164238.tar.gz emacs-c1892f1145dd05df037fc580acc5616f6d164238.zip | |
Fix coding-related core dumps with gcc -ftrapv.
The code was computing A - B, where A and B are pointers, and B is
random garbage. This can lead to core dumps on platforms that
have special pointer registers, and it also leads to core dumps on
x86-64 when compiled with gcc -ftrapv. The fix is to compute
A - B only when B is initialized properly.
* coding.c (coding_set_source, coding_set_destination): Return void.
(coding_change_source, coding_change_destinations): New functions,
with the old behaviors of coding_set_source and coding_set_destination.
All callers that need an offset changed to use these new functions.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bea9b4fbc47..1ade4691184 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2012-05-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix coding-related core dumps with gcc -ftrapv. | ||
| 4 | The code was computing A - B, where A and B are pointers, and B is | ||
| 5 | random garbage. This can lead to core dumps on platforms that | ||
| 6 | have special pointer registers, and it also leads to core dumps on | ||
| 7 | x86-64 when compiled with gcc -ftrapv. The fix is to compute | ||
| 8 | A - B only when B is initialized properly. | ||
| 9 | * coding.c (coding_set_source, coding_set_destination): Return void. | ||
| 10 | (coding_change_source, coding_change_destinations): New functions, | ||
| 11 | with the old behaviors of coding_set_source and coding_set_destination. | ||
| 12 | All callers that need an offset changed to use these new functions. | ||
| 13 | |||
| 1 | 2012-05-26 Glenn Morris <rgm@gnu.org> | 14 | 2012-05-26 Glenn Morris <rgm@gnu.org> |
| 2 | 15 | ||
| 3 | * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791) | 16 | * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791) |