Mercurial > hg > xemacs-beta
comparison src/extents.c @ 2881:0e0af7cbfd1b
[xemacs-hg @ 2005-08-01 16:28:18 by darrylo]
On some (64-bit) systems, sizeof(int) != sizeof(long), and this can
cause crashes because in-use lisp objects can get prematurely gc'd (and
0xdeadbeef'd). This occurs because the memory_description for the
Gap_Array structure incorrectly describes some members as XD_INT's
(32-bit objects), when they should actually be XD_ELEMCOUNT's and
XD_BYTECOUNT's (both 64-bit objects), as that is how they are declared
in the structure.
author | darrylo |
---|---|
date | Mon, 01 Aug 2005 16:28:21 +0000 |
parents | 61af3ea9da02 |
children | 1e7cc382eb16 |
comparison
equal
deleted
inserted
replaced
2880:617b080c902f | 2881:0e0af7cbfd1b |
---|---|
1044 sizeof (Gap_Array_Marker), | 1044 sizeof (Gap_Array_Marker), |
1045 gap_array_marker_description_1 | 1045 gap_array_marker_description_1 |
1046 }; | 1046 }; |
1047 | 1047 |
1048 static const struct memory_description lispobj_gap_array_description_1[] = { | 1048 static const struct memory_description lispobj_gap_array_description_1[] = { |
1049 { XD_INT, offsetof (Gap_Array, gap) }, | 1049 { XD_ELEMCOUNT, offsetof (Gap_Array, gap) }, |
1050 { XD_INT, offsetof (Gap_Array, offset_past_gap) }, | 1050 { XD_BYTECOUNT, offsetof (Gap_Array, offset_past_gap) }, |
1051 { XD_INT, offsetof (Gap_Array, els_past_gap) }, | 1051 { XD_ELEMCOUNT, offsetof (Gap_Array, els_past_gap) }, |
1052 { XD_BLOCK_PTR, offsetof (Gap_Array, markers), 1, | 1052 { XD_BLOCK_PTR, offsetof (Gap_Array, markers), 1, |
1053 { &gap_array_marker_description }, XD_FLAG_NO_KKCC }, | 1053 { &gap_array_marker_description }, XD_FLAG_NO_KKCC }, |
1054 { XD_BLOCK_ARRAY, offsetof (Gap_Array, array), XD_INDIRECT (0, 0), | 1054 { XD_BLOCK_ARRAY, offsetof (Gap_Array, array), XD_INDIRECT (0, 0), |
1055 { &lisp_object_description } }, | 1055 { &lisp_object_description } }, |
1056 { XD_BLOCK_ARRAY, XD_INDIRECT (1, offsetof (Gap_Array, array)), | 1056 { XD_BLOCK_ARRAY, XD_INDIRECT (1, offsetof (Gap_Array, array)), |