Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1814657
  • 博文数量: 274
  • 博客积分: 2366
  • 博客等级: 大尉
  • 技术积分: 1880
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-22 09:37
文章分类

全部博文(274)

文章存档

2022年(1)

2020年(10)

2019年(7)

2018年(18)

2017年(26)

2016年(32)

2015年(43)

2014年(30)

2013年(44)

2012年(36)

2011年(17)

2010年(10)

分类: 嵌入式

2014-02-12 14:20:58

pCell = (stRingBufferCell *)m_pWrite;
pCell->iMagic = NT_RB_CELL_MAGIC;
pCell->iLength = uBufLen;
pCell->pNext = NULL;


RBF_ERROR("pCell->iMagic(%#x, %#x), uBufLen(%d)\n", pCell->iMagic, NT_RB_CELL_MAGIC, uBufLen);


560     in rtspserver/ringbuffer.cpp
(gdb) p *pCell
Cannot access memory at address 0x0
(gdb) n
561     in rtspserver/ringbuffer.cpp
(gdb) p *pCell
$12 = {iMagic = 3452816845, iLength = 3452816845, pNext = 0xcdcdcdcd}
(gdb) n       
562     in rtspserver/ringbuffer.cpp
(gdb) p *pCell
$13 = {iMagic = 3450580426, iLength = 3452816845, pNext = 0xcdcdcdcd}
(gdb) n
563     in rtspserver/ringbuffer.cpp
(gdb) p *pCell
$14 = {iMagic = 1068215754, iLength = 3439329444, pNext = 0xcdcdcdcd}
(gdb) n
565     in rtspserver/ringbuffer.cpp
(gdb) p *pCell
$15 = {iMagic = 1068215754, iLength = 164, pNext = 0xcd000000}
(gdb) n       
pCell->iMagic(0xfeabadca, 0xabadcafe), uBufLen(42047)
568     in rtspserver/ringbuffer.cpp
(gdb) p *pCell
$16 = {iMagic = 1068215754, iLength = 164, pNext = 0xcd000000}
(gdb) p pCell
$17 = (stRingBufferCell *) 0x40c9c0b9


注1: 以上是 armv5的问题, armv7似乎没发现这个问题
注2: malloc 返回的内存地址是偶数对齐的
阅读(1776) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~