Re: glib2 magazines: values in chunk->data pretty low



Glib2 crashes with a segmentation fault.

That is the reason for the e-mail below.

Martin

On Wed, Nov 5, 2014 at 5:11 PM, Mgr. Martin Žember <zember gmail com> wrote:

Hello!

I am wondering about this and I probably misunderstand something:

(gdb)
Continuing.

Breakpoint 4, allocator_add_slab (allocator=0x7ffff38cc260 <allocator>,
chunk_size=32, ix=1) at gslice.c:1285
1285              chunk->next = (ChunkLink*) ((guint8*) chunk +
chunk_size);
1: chunk->data = (ChunkLink *) 0x5555558b9aa0
(gdb) x  (ChunkLink *) 0x5555558c40d0
0x5555558c40d0:        0xf607e524
(gdb) c
Continuing.

Breakpoint 4, allocator_add_slab (allocator=0x7ffff38cc260 <allocator>,
chunk_size=32, ix=1) at gslice.c:1285
1285              chunk->next = (ChunkLink*) ((guint8*) chunk +
chunk_size);
1: chunk->data = (ChunkLink *) 0x5555558cb2c0
(gdb)
Continuing.

Breakpoint 4, allocator_add_slab (allocator=0x7ffff38cc260 <allocator>,
chunk_size=32, ix=1) at gslice.c:1285
1285              chunk->next = (ChunkLink*) ((guint8*) chunk +
chunk_size);
1: chunk->data = (ChunkLink *) 0x110
(gdb)
Continuing.

Breakpoint 4, allocator_add_slab (allocator=0x7ffff38cc260 <allocator>,
chunk_size=32, ix=1) at gslice.c:1285
1285              chunk->next = (ChunkLink*) ((guint8*) chunk +
chunk_size);
1: chunk->data = (ChunkLink *) 0x191841dc0b885e05
(gdb) x (ChunkLink *) 0x110
0x110:        Cannot access memory at address 0x110

The chunk->data is supposed to point to a chunk of memory that is
available, right? I would expect much higher values than 0x110.

It seems that allocator_add_slab() is generating this, but I do not really
understand the code. Could you show me how to proceed further?

Thanks,
Martin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]