Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以用 valgrind 检测整数溢出缺陷吗?它里面的哪个工具可以做到这一点?
Valgrind 没有可以检测整数溢出的工具。您可能会使用 gcc 选项捕获这些错误:
-ftrapv This option generates traps for signed overflow on addition, subtraction, multiplication operations.