在 2021-12-21 23:40, Adrian Moreno via Gcc-help 写道: > Hello, > > I need some help understanding what might be wrong with a piece of code from the openvswitch > project. By ${subject} I'm not suggesting there's a problem in gcc, clang also shows the same > behavior so it's likely our code is broken. I am kindly asking for help to understand/troubleshoot > the problem. > The typical approach to discovering such issues is to use address sanitizer [1] or valgrind [2]. The former is usually recommended. Optimization is not necessarily enabled. [1] https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fsanitize_003daddress [2] https://valgrind.org/docs/manual/quick-start.html -- Best regards, LIU Hao