WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Hello Alessandro, you can definitely use CSmith to find bugs in cross compilers (and we've done this as well).
The only thing you want to watch out for is comparing checksums across multiple architectures -- this will only work if the architectures make identical decisions for all of the relevant implementation-defined behaviors. So it's generally best to keep differential
testing within a single target.
John
Dear All,
I have a question w.r.t. csmith to tell cross-compilation to different architectures. First, I want to catch bugs the do not crash the compiler but that result in a wrong code generation of the target program that I want to compile. Let’s say that I want to cross-compile to a different architecture X, is it sufficient to run the generated binary program with qemu-user- mode for that architecture X ? I mean, of course this introduces the possibility that, when a bug is detected, also qemu-user-mode may be responsible, but that’s another story. Am I missing something else?
Best Regards,
Alessandro