undead 发表于 2011-12-8 20:02:36

erx线程崩溃。实在找不到原因,请教大家

\ | /
- RT -   Thread Operating System
/ | \ 0.3.1 build Dec8 2011
2006 - 2010 Copyright by rt-thread team

rtc is not configured
please configure with set_date and set_time

File System initialized!
finsh>>
TCP/IP initialized!

psr: 0x01000000
pc: 0x0800d0fe
lr: 0x0800bdeb
r12: 0x00000000
r03: 0x0000eff4
r02: 0x20001000
r01: 0x000000a0
r00: 0x20005d4c
hard fault on thread: erx
threadpristatus      sp   stack size max used   left tickerror
-------- ---- ------- ---------- ---------- ---------- ---------- ---
tcpip    0x0c suspend 0x000000a8 0x00000400 0x000000a8 0x00000014 000
etx      0x0f suspend 0x00000080 0x00000400 0x00000080 0x00000010 000
erx      0x0f ready   0x00000078 0x00000400 0x00000078 0x00000010 000
tidle    0x1f ready   0x00000050 0x00000100 0x00000050 0x0000001c 000
tshell   0x14 suspend 0x00000070 0x00000800 0x00000070 0x0000000a 000



其中lr:0x0800bdeb 处为rt_sem_take里面
if (rt_object_take_hook != RT_NULL) rt_object_take_hook(&(sem->parent.parent));

pc: 0x0800d0fe 处为rt_malloc里面的 used_mem += (size + SIZEOF_STRUCT_MEM);

搞不懂到底是啥原因

i55x 发表于 2011-12-8 20:20:12

heap溢出了?貌似这是malloc失败的主要原因。

undead 发表于 2011-12-8 20:25:03

有时候又会产生另外一个
(mem->magic == HEAP_MAGIC) assert failed at rt_free:497

mbbill 发表于 2011-12-8 20:32:39

升级0.3.2

undead 发表于 2011-12-8 20:35:10

回复【3楼】mbbill
-----------------------------------------------------------------------确实是0.3.1,有问题?

mbbill 发表于 2011-12-8 21:01:03

undead 发表于 2011-12-9 12:30:35

回复【5楼】mbbill
-----------------------------------------------------------------------

具体什么问题呢?

ffxz 发表于 2011-12-9 16:16:33

从ASSERT来看,像是出现了memory overwrite的问题。版本使用上,建议使用0.3.3。

undead 发表于 2011-12-11 10:56:54

回复【7楼】ffxz
-----------------------------------------------------------------------

已换成0.4.0 RC1
页: [1]
查看完整版本: erx线程崩溃。实在找不到原因,请教大家