>>>> "N" == Norbert Koch <nk(a)LF.net>
writes:
N> Hi!
N> I was in Gnus, stepped out of a group and re-entered it, and have
N> been rewarded with the following core. No Lisp-Backtrace ...
N> #0 0x185563d0 in kill () from /usr/lib/libc.so.3
N> #1 0x80c58b3 in fatal_error_signal (sig=6) at emacs.c:535
N> #2 0xbfbfdfdc in ?? ()
N> #3 0x80c89fa in assert_failed (file=0x829f47f "alloc.c", line=2245,
N> expr=0x829fd60 "! MARKED_RECORD_HEADER_P (lheader)") at emacs.c:3214
N> #4 0x808e173 in allocate_managed_lcrecord (lcrecord_list={gu = {
N> type = Lisp_Type_Record, val = 35405760}, s = {bits = 0,
N> val = 70811520}, u = {bits = 0, val = 70811520}, ui = 141623040,
N> i = 141623040, v = 0x870ff00, cv = 0x870ff00}) at alloc.c:2245
You're using pdump?
Could you see whether my recent changes make a difference (assuming
you can reproduce this)?
Index: src/lstream.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/lstream.c,v
retrieving revision 1.12.2.16
diff -u -w -r1.12.2.16 lstream.c
--- src/lstream.c 2000/10/12 04:58:59 1.12.2.16
+++ src/lstream.c 2001/01/24 06:23:50
@@ -179,11 +179,17 @@
}
}
+inline static size_t
+aligned_sizeof_lstream (size_t lstream_type_specific_size)
+{
+ return ALIGN_SIZE (offsetof (Lstream, data) + lstream_type_specific_size,
+ ALIGNOF (max_align_t));
+}
+
static size_t
sizeof_lstream (const void *header)
{
- const Lstream *lstr = (const Lstream *) header;
- return sizeof (*lstr) + lstr->imp->size - 1;
+ return aligned_sizeof_lstream (((const Lstream *) header)->imp->size);
}
DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("stream", lstream,
@@ -231,15 +237,15 @@
assert (lstream_type_count < countof (lstream_types));
lstream_types[lstream_type_count] = imp;
Vlstream_free_list[lstream_type_count] =
- make_lcrecord_list (sizeof (*p) + imp->size - 1,
+ make_lcrecord_list (aligned_sizeof_lstream (imp->size),
&lrecord_lstream);
lstream_type_count++;
}
p = XLSTREAM (allocate_managed_lcrecord (Vlstream_free_list[i]));
/* Zero it out, except the header. */
- memset ((char *) p + sizeof (p->header), 0,
- sizeof (*p) - sizeof (p->header) + imp->size - 1);
+ memset ((char *) p + sizeof (p->header), '\0',
+ aligned_sizeof_lstream (imp->size) - sizeof (p->header));
p->imp = imp;
Lstream_set_buffering (p, LSTREAM_BLOCK_BUFFERED, 0);
p->flags = LSTREAM_FL_IS_OPEN;
Index: src/lstream.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/lstream.h,v
retrieving revision 1.5.2.8
diff -u -w -r1.5.2.8 lstream.h
--- src/lstream.h 2000/10/12 04:59:04 1.5.2.8
+++ src/lstream.h 2001/01/23 04:16:15
@@ -167,8 +167,8 @@
size_t unget_buffer_ind; /* pointer to next buffer spot to write a character */
size_t byte_count;
- long flags; /* Align pointer for 64 bit machines (kny) */
- char data[1];
+ int flags;
+ max_align_t data[1];
};
#define LSTREAM_TYPE_P(lstr, type) \