Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Aug 2002 13:38:27 +0200 (CEST)
From:      Martin Blapp <mb@imp.ch>
To:        <dev@porting.openoffice.org>
Cc:        <openoffice@freebsd.org>
Subject:   Crash with Test-Document in the second run. Memory allocation problem
Message-ID:  <20020810133026.G92422-100000@levais.imp.ch>
In-Reply-To: <200208092032.27738.kevin.hendricks@sympatico.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

0x285ef215 in rtl_freeMemory (p=0x0) at alloc.c:1325
1325                    RTL_MEMORY_ENQUEUE (&memory);

(gdb) frame 0
#0  0x285ef215 in rtl_freeMemory (p=0x0) at alloc.c:1325
1325                    RTL_MEMORY_ENQUEUE (&memory);
(gdb) list
1320                    DBG_MEMORY_VERIFY(memory);
1321
1322                    /* clear 'used' bit, enqueue */
1323                    memory->m_length &= 0x7fffffff;
1324
1325                    RTL_MEMORY_ENQUEUE (&memory);
1326                    if (memory)
1327                    {
1328                            /* free memory page */
1329                            RTL_MEMORY_FREE(memory, memory->m_length);
(gdb)

What I don't understand. This part is only executed if p != NULL. Why is p
suddenly NULL inside this function ?

(gdb) p p
$1 = (void *) 0x0

(gdb) p memory
$2 = (struct __rtl_memory_desc_st *) 0x2e5141f8

(gdb) p memory->m_length
$3 = 0

(gdb) p memory->m_blink
$4 = (struct __rtl_memory_desc_st *) 0x0

(gdb) p memory->m_offset
$5 = 0

(gdb) p memory->m_flink
$6 = (struct __rtl_memory_desc_st *) 0x1

Huh ? We free Memory with a lenght of 0 ?

Martin

Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: <finger -l mbr@freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-openoffice" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020810133026.G92422-100000>