mull
mull copied to clipboard
Mull corrupted LLVM module
I tried using mull against our codebase and got this error:
[error] Uh oh! Mull corrupted LLVM module. 28/56: matrixmultiply, anyhow, proc-macro2, wide, num-traits(build), typenum, cxx(build.rs), link-cplusplus(build.rs) Please, report the following error message here https://github.com/mull-project/mull/issues Underlying error message: Instruction does not dominate all uses! %157 = call zeroext i1 @ZN19kr2rc_api_internals5Timex8soonerEqERK8timespecS3(%struct.timespec* nonnull align 8 dereferenceable(16) %8, %struct.timespec* nonnull align 8 dereferenceable(16) %20), !dbg !17016 %160 = phi i1 [ %157, %158 ], [ %157, %150 ], !dbg !17017
The module was corrupted by 'cxx_logical_and_to_or' mutator. To disable it, add the following: ignoreMutators:
- cxx_logical_and_to_or
build command was: catkin_make -DCMAKE_CXX_FLAGS="-O0 -fexperimental-new-pass-manager -fpass-plugin=/usr/lib/mull-ir-frontend-12 -g -grecord-command-line -fprofile-instr-generate -fcoverage-mapping" install
Hi @JaroslavHavrda, I guess this is a private codebase from which I cannot get a small reproducer to fix the underlying issue? 😄
Hi @AlexDenisov Yes, it is private codebase. I will try to create a reproducer, but please be patient with me. I am a bit overloaded right now.
Command to build: cmake -DCMAKE_CXX_FLAGS="-O0 -fexperimental-new-pass-manager -fpass-plugin=/usr/lib/mull-ir-frontend-12 -g -grecord-command-line -fprofile-instr-generate -fcoverage-mapping" .. make
Hi @JaroslavHavrda, thank you so much for creating the reproducer, though the archive appears to be empty? 😅
kr2_rc_api.zip Sorry this was my fuckup with using zip command in linux. I created the zipfile on windows and now it is not empty. I hope it is good now,
If not, I will just copy source files here.
@JaroslavHavrda I can see it now, thanks! 🎉
Oddly, I cannot reproduce it on macOS 😞
Hmm. The reproducer works fine right now, whole codebase does not. There is something more I need to dig into.
@JaroslavHavrda please, keep in mind that this mutator is experimental and is not recommended for production usage (yes, the documentation on this one should be improved and we should probably issue a warning in such cases).
I found some pointer -- seems that the problem disappeared when switching between vanilla cmake and catkin_make (http://wiki.ros.org/catkin/commands/catkin_make). We are moving away from catkin_make to vanilla cmake anyway, so I this is no issue for me. I am not sure is troubleshooting build system that is being phased away -- even ROS is switching build system -- is valuable, so I am ok with closing this issue. But if you want to troubleshoot it, I will prepare catkin_make reproducer for you.
P.S. I am not using mull in production. I am just checking what the framework can give me.
I added a warning to prevent enabling of experimental features unintentionally https://github.com/mull-project/mull/pull/1008.