On 9/15/05, Marcus Crestani <crestani(a)informatik.uni-tuebingen.de> wrote:
- assert (!PH_ON_FREE_LIST_P (ph));
+ assert (ph);
+ assert (PH_PLH (ph));
It breaks here.
+ assert (PLH_LIST_TYPE (PH_PLH (ph)) != FREE_LIST);
remove_cell (ptr, ph);
Attaching to the debugger after valgrind reports the error and looking
at `*ph' and `*ph->plh' might also be useful (`--db-attach=yes').
--gdb-attach=yes, btw. The environment is quite different due to
valgrind, but here it is:
(gdb) bt
#0 vg_do_syscall3 (syscallno=4294966784, arg1=15598, arg2=0, arg3=0)
at vg_mylibc.c:92
#1 0x00003cee in ?? ()
#2 0x081b36ae in mc_free (ptr=0xb5b9a840) at mc-alloc.c:1632
#3 0x0808b660 in free_lrecord (lrecord=-1246123968) at alloc.c:645
#4 0x081d10c1 in free_opaque_ptr (ptr=-1246123968) at opaque.c:187
#5 0x080e2f3b in condition_bind_unwind (loser=-1246061776) at eval.c:1761
#6 0x080eac92 in unbind_to_hairy (count=1) at eval.c:6065
#7 0x080eabe2 in unbind_to_1 (count=1, value=-1246470120) at eval.c:6017
#8 0x080e3803 in call_with_condition_handler (
handler=0x80e892a <flagged_a_squirmer>, handler_arg=-1246123976,
fun=0x80e8998 <call_trapping_problems_2>, arg=-1246123976) at eval.c:2135
#9 0x080e89ed in call_trapping_problems_1 (opaque=-1246123976) at eval.c:4891
#10 0x080e2bdd in internal_catch (tag=-1246124032,
func=0x80e89d2 <call_trapping_problems_1>, arg=-1246123976,
threw=0xbffff07c, thrown_tag=0xbffff088, backtrace_before_throw=0xbffff080)
at eval.c:1530
#11 0x080e8e01 in call_trapping_problems (warning_class=-1246414952,
warning_string=0x0, flags=98311, problem=0x0,
fun=0x80e9036 <va_call_trapping_problems_1>, arg=0xbffff190) at eval.c:5164
#12 0x080e96fb in call_with_suspended_errors (
fun=0x82238ba <call_validate_method>, retval=-1246470144,
class_=-1246414952, errb=
---Type <return> to continue, or q <return> to quit---
{really_unlikely_name_to_have_accidentally_in_a_non_errb_structure
= 42}, nargs=2) at eval.c:5329
#13 0x0822397c in check_valid_instantiator (instantiator=-1246217364,
meths=0xb5b8d52c, errb=
{really_unlikely_name_to_have_accidentally_in_a_non_errb_structure = 42})
at specifier.c:1203
#14 0x08223b37 in check_valid_inst_list (inst_list=-1246061860,
meths=0xb5b8d52c, errb=
{really_unlikely_name_to_have_accidentally_in_a_non_errb_structure = 42})
at specifier.c:1261
#15 0x08223c2f in Fvalid_inst_list_p (inst_list=-1246061860, type=-1246416896)
at specifier.c:1285
#16 0x0822646c in set_specifier_fallback (specifier=-1246221104,
fallback=-1246061860) at specifier.c:2427
#17 0x08163d97 in allocate_glyph (type=GLYPH_BUFFER,
after_change=0x81fa440 <redisplay_glyph_changed>) at glyphs.c:3841
#18 0x08169df0 in complex_vars_of_glyphs () at glyphs.c:5569
#19 0x080db8f5 in xemacs_21_5_b21_i686_pc_linux (argc=6, argv=0xbffff474,
unused_envp=0x0, restart=0) at emacs.c:2380
#20 0x080dc507 in main (argc=6, argv=0xbffff474, unused_envp=0xbffff490)
at emacs.c:3064
#21 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)
(gdb) up
#1 0x00003cee in ?? ()
(gdb) up
#2 0x081b36ae in mc_free (ptr=0xb5b9a840) at mc-alloc.c:1632
1632 assert (PH_PLH (ph));
(gdb) print *ph
Cannot access memory at address 0x3cb5bacc
(gdb) print ph
$1 = (struct page_header *) 0x3cb5bacc
--alexm