随笔分类 -  Technical

Self assignment
摘要:自己赋值给自己,比如:x = x;这可能会导致严重的问题。 详细: https://isocpp.org/wiki/faq/assignment-operators 阅读全文

posted @ 2017-04-15 16:05 cleverlzc 阅读(186) 评论(0) 推荐(0)

Operands of different size in bitwise operation
摘要:Operands of different size in bitwise operation,不同大小的位运算的操作数。 BIT位两边不是相同的类型,并进行了操作运算。 BIT位操作比较敏感,建议这种情况都手动修改下,把BIT位两边都强转成同样类型来进行操作。 阅读全文

posted @ 2017-04-15 15:37 cleverlzc 阅读(483) 评论(0) 推荐(0)

Insecure Compiler Optimization
摘要:不安全的编译器优化,大概是说一个优化的编译器可能自作主张的帮你优化你的代码,而发生一些不安全的或者不可预期的错误。 This is a Vulnerability. 这是一个漏洞。(WIKI) Abstract Improperly scrubbing sensitive data from mem 阅读全文

posted @ 2017-04-15 15:33 cleverlzc 阅读(276) 评论(0) 推荐(0)

negative array index read
摘要:Memory - illegal accesses:negative array index read 负的数组索引读取 This is only valid if arr is a pointer that points to the second element in an array or a 阅读全文

posted @ 2017-04-15 15:10 cleverlzc 阅读(253) 评论(0) 推荐(0)

Unintended sign extension
摘要:符号扩展包括: Integral promotion A char, short, enumerated type, or bit-field, whether signed or unsigned, can be used in any expression that calls for an i 阅读全文

posted @ 2017-04-15 14:47 cleverlzc 阅读(439) 评论(0) 推荐(0)

模拟垃圾分布
摘要:// TestRandomGC.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include #include #include #include using namespace std; /* 已知跑了20个小时后,垃圾量的分布情况,20%垃圾量的档位有22%,22%-50%垃圾量的比较平均了... 阅读全文

posted @ 2017-04-10 21:16 cleverlzc 阅读(171) 评论(0) 推荐(0)