powerantone 发表于 2025-7-8 16:33

程序在 Debug 模式下运行正常,但在 Release 模式下出现异常

程序在 Debug 模式下运行正常,但在 Release 模式下出现异常。

彩虹捕手 发表于 2025-7-9 08:29

这种情况通常是由于优化设置导致的。请检查你的编译器设置,确保在Release模式下没有启用过于激进的优化。

probedog 发表于 2025-7-30 16:41

Release 模式 启用了编译器优化?

flycamelaaa 发表于 2025-7-30 17:42

用 clang-tidy、cppcheck 或编译器警告。

classroom 发表于 2025-7-30 19:43

可能是因为Debug 模式下依赖断言(assert)或日志,但 Release 模式下未启用替代逻辑。
页: [1]
查看完整版本: 程序在 Debug 模式下运行正常,但在 Release 模式下出现异常