One torture

 

  It's about a mistake I blundered when I worked for a aero-related company. We were lack of equipments which hadn't been made or data hadnot been designed entirely to test codes.  So I had to admit our softwares werenot been tested thoroughly before the sat launched but shouldn't beef about it, it's the reality.

 One of our programms crashed sometimes for a error in virtual function call when a satellite passed through, so the coder had to suffer from the stress of boss and the army and unfortunately this time it's me. Some experts in company gathered to discuss the problem 2or3 times vainly.  Am totally bewildered by the problem for many weeks - the phenomenon is so weird, everything is ok, virtual call is ok... - until one day I read about a sentence my cooperator wrote I rarely checked.

  strcpy(des, src);

  I think it should be strncpy(), the src sometimes can be trimmed then des memory was overwritten until God willing, also, where virtual functions table may locate. I can't believe just the stupid mistake baffled me so much.The programm goes well after the correction though there may be other latent problems.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值