Silly Computer Engineer.
Lin~Jing~Sen
Something as small as the flutter of the butterfly's wing
can ultimately cause a typoon half way around the world

Group Blog
 
All Blogs
 
*** glibc detected *** free(): invalid next size (fast): 0x092d77f8 ***

t 51.905707418 Node 2 recv SWD ASK msg
t 51.905707802 Node 4 recv SWD ASK msg
Node 4 send ANSWER MSG
t 51.905707883 Node 5 recv SWD ASK msg
Node 5 send ANSWER MSG
t 51.905707935 Node 6 recv SWD ASK msg
Node 6 send ANSWER MSG
*** glibc detected *** free(): invalid next size (fast): 0x092d77f8 ***
Aborted

ความผิดพลาดนี้เกิดจากการกำหนดขนาดผิดพลาด
ผมมีการสร้างแพ็คเก็ตใหม่ 2 ชนิด คือ ASK และ ANSWER ซึ่งแต่ละแบบมีจำนวน field ไม่เท่ากัน

การใส่ข้อมูลทำได้โดย
p->allocdata(sizeof(AskMsg));
walk = p->accessdata ();
hdrc->size_ = sizeof(AskMsg) + IP_HDR_LEN;


แต่ใน ANSWE Msg ผมลืมเปลี่ยนการจองขนาดเป็นเหมือน ASK Msg ทำให้เกิดความผิดพลาดนี้ขึ้น



Create Date : 26 มีนาคม 2549
Last Update : 26 มีนาคม 2549 21:19:42 น. 0 comments
Counter : 442 Pageviews.

ชื่อ :
Comment :
  *ใช้ code html ตกแต่งข้อความได้เฉพาะสมาชิก
 

nmapxp
Location :
กรุงเทพ Thailand

[Profile ทั้งหมด]

ฝากข้อความหลังไมค์
Rss Feed

ผู้ติดตามบล็อก : 1 คน [?]





Friends' blogs
[Add nmapxp's blog to your web]
Links
 

 Pantip.com | PantipMarket.com | Pantown.com | © 2004 BlogGang.com allrights reserved.