[compiler-rt] [test][asan] Check for order of DynInitPoison (PR #101584)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 3 05:21:15 PDT 2024


mstorsjo wrote:

> This looks like the test is expecting the static initialization to be done in a specific order (first `initialization-nobug.cpp` then `initialization-nobug-extra.cpp`), but the order of static initialization in different TUs is unspecified, isn't it? So it doesn't seem to be a bug with the mingw-w64 target, just that the ordering of functions in the combined `.ctors` section and that the list is executed backwards on mingw-w64 CRT, is making it behave differently compared to Linux and even MSVC targets.

Thanks! So if we could make the test tolerate these two lines in any order (`CHECK-DAG:` maybe?), it'd work? But that's probably a bit harder when we want to check that we have the `DynInitUnpoison` lines inbetween...

https://github.com/llvm/llvm-project/pull/101584


More information about the llvm-commits mailing list