-
Notifications
You must be signed in to change notification settings - Fork 355
Add unit tests for Fortran's type finalization feature #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I have a couple of comments inline, and also a more general question: Is there any magic you could use to disable some or all of these tests if the compiler doesn't support this feature?
test_results = get_test_results() | ||
|
||
do i=1,size(test_results) | ||
print *, report(test_results(i)%outcome), test_results(i)%description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List-directed output leaves room for all sorts of delimiters between values (one or more blanks, comma, semicolon), so it makes it more difficult to compare the output with a reference. I would recommend using a well-defined format, to force all compilers to produce the exact same output.
@@ -0,0 +1,6 @@ | |||
add_executable( test_finalization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds an executable, but doesn't actually run the test. You should add a reference output and some boilerplate similar to what's been done for SNAP. Note that that implementation is a bit messy at the moment - if you have some cycles to spend on this, you could try to extract some CMake helpers to use both here and in SNAP, similar to what we have for C++ tests.
@rovka Are Pull Requests accepted in this repository? |
@kiranchandramohan I'm seeing a "Merge pull request" button, so... maybe? In any case, that's a good point. I don't mind reviewing here, but we should probably add a link to the PR in the commit message (similar to how we have the "Differential Revision" tag for Phabricator reviews), so people can easily find the discussion. |
@rouson There is a patch up for review for the derived-type finalization in flang (https://reviews.llvm.org/D142707). It currently passes 9/10 tests. BLOCK construct is not yet implemented. |
@clementval that's great progress! Thanks for the update. |
In principle, the same policies as for https://github.com/llvm/llvm-project applies: It has a bot that automatically closes all pull requests (see e.g. llvm/llvm-project#60154), but it seems that they are not configured the same way.
That not good, we still don't want merge commits, but a linear history. Rebase should be the only option. |
This patch implements the derived-type finalization for monomorphic and polymorphic derived-type. The finalization is done through a call to the `Destroy` runtime function so the allocatable component object are also finalized correctly when needed. It would be possible to finalize monomorphic derived-type with non finalizable component with a direct call to their finalize subroutine. 7.5.6.3 point 1: LHS nonallocatable object and LHS allocatable object finalization. Done with call to `Destroy` for monomorphic derived-type and through `Assign` for polymorphic entities. 7.5.6.3 point 2: Done within the deallocation calls. 7.5.6.3 point 3: A function context is added to the bridge to attach finalization that need to happen on function/subroutine exit. 7.5.6.3 point 4: BLOCK construct not yet implemented. 7.5.6.3 point 5/6: Finalization attach to the stmtCtx in a similar way than 9.7.3.2 point 4. 7.5.6.3 point 7: INTENT(OUT) finalization done with a call to `Destroy` runtime function call. This patch passes 9/10 tests in the proposed test-suite llvm/llvm-test-suite#13 - The case with BLOCK construct will be implemented later when BLOCK are implemented upstream. - Automatic deallocation is not yet implemented. Finalization triggered by automatic deallocation is then not triggered. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D142707
Greetings @rovka, @kiranchandramohan, @clementval and @Meinersbur. @rouson has tasked me with getting this submission to llvm-test-suite over the finish line. I have relatively extensive CMake and git experience, so, from a technical perspective I'm relatively comfortable with the feedback so far, however this is my first endeavor submitting a patch to LLVM. I have read https://llvm.org/docs/Contributing.html and https://llvm.org/docs/Phabricator.html and have created a phabricator account (https://reviews.llvm.org/p/zbeekman/) but I'm still wading through some of the details and trying to figure out how to set up git-clang-format the fastest/most straightforward way on macOS and trying to decipher how to submit the patch with phabricator/arcanist. Any additional tips/tricks/concise advice is certainly welcome. |
I think contribution to the test suite can go through github PR directly. No need for a phab review. Last time I check there was some tests requiring "not yet implemented" features. Do you plan to implement those or disable the tests for the moment? |
OK, great! That's a bit of a relief. I should still probably figure out phabricator and the normal review process but I'm glad to hear I can iterate on GitHub.
I don't believe I have the expertise required to implement the tests that fail because they rely on "not yet implemented" features. If there is a canonical way to mark a test as being relevant to a not-yet-implemented feature please let me know. Otherwise I could set the From your previous comment:
I can mark the test for BLOCK construct as
The preferred approach is for all the relevant testing code to be compiled and run via CMake, and trying to match the style of existing flang/llvm infrastructure, correct? |
BLOCK should be fine now. The test that compile and execute the second file should give you build failure with not yet implemented error. |
I don't see any pull request ever landed in this repo (all commits seem reviewed on Phab instead), did anything change recently? |
Right. I was puzzled by the fact we can open PR here. But @joker-eph is right, phab is the way also here. |
88de4e9
to
09e5344
Compare
Ok, it seems like I need to go through phab.. I'll have to figure out how to finish getting that setup and how to initiate the process. In the meantime, any feedback that you are able to provide here would be most welcome (hopefully to reduce cycles spent going back and forth in phabricator). I have:
To attempt to keep the tests in a single source file from CMake's perspective and to strike a balance between complexity and avoiding duplicating code, I used old school @rouson: All the tests pass with
|
- Version tested: `git` commit `76911b5f75907eef53a30cc3` | ||
- Result: Fails with the error message `not yet implemented: derived type finalization` | ||
|
||
- Version tested: `git` commit `27b6ddbf6ea632389f582c0ca1481ed370f0af45` on 2023-04-06. | ||
- Result: Fails with the error message: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you need to update the results here.
Besides updating the README with your latest result I think you can go ahead and submit a phab review. |
Shoot, yes I need to update the README here/on my phab request.
…On Fri, Apr 7, 2023 at 3:11 PM Valentin Clement (バレンタイン クレメン) < ***@***.***> wrote:
Besides updating the README with your latest result I think you can go
ahead and submit a phab review.
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACEIPGJ2GV5G526O2AQBITXABRE5ANCNFSM6AAAAAAQN7HCPE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
09e5344
to
1c2806f
Compare
5c31a8e
to
b1215a4
Compare
28852c2
to
2bdede1
Compare
This suite of tests was created originally by Wileam Phan, Damian Rouson, and Brad Richardson as part of the [[ https://github.com/sourceryinstitute/smart-pointers | Smart-Pointers ]] library's test suite. All compilers, except for NAG, did not initially have a working/correct implmentation of finalization. The original adaptation for inclusion in the llvm-test-suite can be found here: * https://github.com/BerkeleyLab/llvm-test-suite/tree/damians-fortran-type-finalization SHA: `0268bcf0048e67cd1280f9ef65aebd2aa402130b` * https://github.com/BerkeleyLab/llvm-test-suite/tree/berkely-lab-damian-v0.1 SHA: `0268bcf0048e67cd1280f9ef65aebd2aa402130b` The test suite was then adapted to be made appropriate for inclusion in a compiler test suite by Izaak Beekman. A summary of the tests can be found in the README.md file added in the `Fortran/UnitTests` subdirectory. Co-Authored-by: Damian Rouson <[email protected]>
2bdede1
to
21e7593
Compare
This has been merged in 65b897. |
This patch implements the derived-type finalization for monomorphic and polymorphic derived-type. The finalization is done through a call to the `Destroy` runtime function so the allocatable component object are also finalized correctly when needed. It would be possible to finalize monomorphic derived-type with non finalizable component with a direct call to their finalize subroutine. 7.5.6.3 point 1: LHS nonallocatable object and LHS allocatable object finalization. Done with call to `Destroy` for monomorphic derived-type and through `Assign` for polymorphic entities. 7.5.6.3 point 2: Done within the deallocation calls. 7.5.6.3 point 3: A function context is added to the bridge to attach finalization that need to happen on function/subroutine exit. 7.5.6.3 point 4: BLOCK construct not yet implemented. 7.5.6.3 point 5/6: Finalization attach to the stmtCtx in a similar way than 9.7.3.2 point 4. 7.5.6.3 point 7: INTENT(OUT) finalization done with a call to `Destroy` runtime function call. This patch passes 9/10 tests in the proposed test-suite llvm/llvm-test-suite#13 - The case with BLOCK construct will be implemented later when BLOCK are implemented upstream. - Automatic deallocation is not yet implemented. Finalization triggered by automatic deallocation is then not triggered. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D142707
This patch implements the derived-type finalization for monomorphic and polymorphic derived-type. The finalization is done through a call to the `Destroy` runtime function so the allocatable component object are also finalized correctly when needed. It would be possible to finalize monomorphic derived-type with non finalizable component with a direct call to their finalize subroutine. 7.5.6.3 point 1: LHS nonallocatable object and LHS allocatable object finalization. Done with call to `Destroy` for monomorphic derived-type and through `Assign` for polymorphic entities. 7.5.6.3 point 2: Done within the deallocation calls. 7.5.6.3 point 3: A function context is added to the bridge to attach finalization that need to happen on function/subroutine exit. 7.5.6.3 point 4: BLOCK construct not yet implemented. 7.5.6.3 point 5/6: Finalization attach to the stmtCtx in a similar way than 9.7.3.2 point 4. 7.5.6.3 point 7: INTENT(OUT) finalization done with a call to `Destroy` runtime function call. This patch passes 9/10 tests in the proposed test-suite llvm/llvm-test-suite#13 - The case with BLOCK construct will be implemented later when BLOCK are implemented upstream. - Automatic deallocation is not yet implemented. Finalization triggered by automatic deallocation is then not triggered. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D142707
[6/7] : && /home/erickilmer/src/llvm-test-suite/build/tools/timeit --summary MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.link.time /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEBUG MultiSource/Benchmarks/tramp3d-v4/CMakeFiles/tramp3d-v4.dir/tramp3d-v4.cpp.o -o MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4 && cd /home/erickilmer/src/llvm-test-suite/build/MultiSource/Benchmarks/tramp3d-v4 && /usr/bin/cmake -E create_symlink /home/erickilmer/src/llvm-test-suite/MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.reference_output /home/erickilmer/src/llvm-test-suite/build/MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.reference_output FAILED: MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4 : && /home/erickilmer/src/llvm-test-suite/build/tools/timeit --summary MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.link.time /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEBUG MultiSource/Benchmarks/tramp3d-v4/CMakeFiles/tramp3d-v4.dir/tramp3d-v4.cpp.o -o MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4 && cd /home/erickilmer/src/llvm-test-suite/build/MultiSource/Benchmarks/tramp3d-v4 && /usr/bin/cmake -E create_symlink /home/erickilmer/src/llvm-test-suite/MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.reference_output /home/erickilmer/src/llvm-test-suite/build/MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.reference_output ClangLoc: /home/erickilmer/src/instafix-llvm/llvm/out/install/linux/bin/clang Executing a non indexed phase: "/home/erickilmer/src/instafix/out/build/linux/instafix-lld/instafix-lld-tool" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -pie -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4 /lib/x86_64-linux-gnu/Scrt1.o /lib/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -L/lib -L/usr/lib --fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld MultiSource/Benchmarks/tramp3d-v4/CMakeFiles/tramp3d-v4.dir/tramp3d-v4.cpp.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /lib/x86_64-linux-gnu/crtn.o program_name: /home/erickilmer/src/instafix/out/build/linux/instafix-lld/instafix-lld-tool input_file: /lib/x86_64-linux-gnu/Scrt1.o input_file: /lib/x86_64-linux-gnu/crti.o input_file: /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o input_file: MultiSource/Benchmarks/tramp3d-v4/CMakeFiles/tramp3d-v4.dir/tramp3d-v4.cpp.o input_file: /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o input_file: /lib/x86_64-linux-gnu/crtn.o instafix-lld-tool: /home/erickilmer/src/instafix-llvm/llvm/include/llvm/ADT/SmallVector.h:313: const_reference llvm::SmallVectorTemplateCommon<mlir::Operation *>::back() const [T = mlir::Operation *]: Assertion `!empty()' failed. could not parse main module PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEBUG MultiSource/Benchmarks/tramp3d-v4/CMakeFiles/tramp3d-v4.dir/tramp3d-v4.cpp.o -o MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4 #0 0x00005b86b8f13d41 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Unix/Signals.inc:804:11 #1 0x00005b86b8f1423b PrintStackTraceSignalHandler(void*) /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Unix/Signals.inc:880:1 #2 0x00005b86b8f119a6 llvm::sys::RunSignalHandlers() /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Signals.cpp:105:5 llvm#3 0x00005b86b8f14a1d SignalHandler(int, siginfo_t*, void*) /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Unix/Signals.inc:418:7 llvm#4 0x00007601f3845330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330) llvm#5 0x00005b86abc1a58a mlir::Operation::getRegion(unsigned int) /home/erickilmer/src/instafix-llvm/llvm/out/install/linux/include/mlir/IR/Operation.h:688:5 llvm#6 0x00005b86ac94eb1f mlir::ModuleOp::getBodyRegion() /home/erickilmer/src/instafix-llvm/llvm/out/build/linux/tools/mlir/include/mlir/IR/BuiltinOps.h.inc:200:5 llvm#7 0x00005b86affa97b2 mlir::link::LinkState::LinkState(mlir::ModuleOp) /home/erickilmer/src/instafix-llvm/mlir/include/mlir/Linker/LinkerInterface.h:40:61 llvm#8 0x00005b86affa7108 mlir::link::Linker::link(bool) /home/erickilmer/src/instafix-llvm/mlir/lib/Linker/Linker.cpp:74:13 llvm#9 0x00005b86abbffd34 instafix::Loader::LinkInstafixLLVM() /home/erickilmer/src/instafix/instafix/lib/instafix.cpp:818:35 llvm#10 0x00005b86abc36dc2 instafix::LLDLoader::NativeLinkAndJIT(int, llvm::ArrayRef<char const*>, bool) /home/erickilmer/src/instafix/instafix/lib/LLDLoader.cpp:42:27 llvm#11 0x00005b86abbfa649 instafix::instafix_main(int, char**) /home/erickilmer/src/instafix/instafix/lib/instafix.cpp:264:32 llvm#12 0x00005b86abbf6992 main /home/erickilmer/src/instafix/bin/instafix-front/Main.cpp:25:3 llvm#13 0x00007601f382a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3 llvm#14 0x00007601f382a28b call_init ./csu/../csu/libc-start.c:128:20 llvm#15 0x00007601f382a28b __libc_start_main ./csu/../csu/libc-start.c:347:5 llvm#16 0x00005b86abbf68a5 _start (/home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front+0x688a8a5)
Just one example, but others are likely similar (at least with same stacktrace) ``` [1/7] : && /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEB UG tools/CMakeFiles/not.dir/not.cpp.o -o tools/not && : FAILED: tools/not : && /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEBUG tools/CMakeFiles/not.dir/not.cpp.o -o tools/not && : ClangLoc: /home/erickilmer/src/instafix-llvm/llvm/out/install/linux/bin/clang Executing a non indexed phase: "/home/erickilmer/src/instafix/out/build/linux/instafix-lld/instafix-lld-tool" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -pie -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o tools/not /lib/x86_64-linux-gnu/Scrt1.o /lib/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -L/lib -L/usr/lib --fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld tools/CMakeFiles/not.dir/not.cpp.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /lib/x86_64-linux-gnu/crtn.o program_name: /home/erickilmer/src/instafix/out/build/linux/instafix-lld/instafix-lld-tool input_file: /lib/x86_64-linux-gnu/Scrt1.o input_file: /lib/x86_64-linux-gnu/crti.o input_file: /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o input_file: tools/CMakeFiles/not.dir/not.cpp.o input_file: /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o input_file: /lib/x86_64-linux-gnu/crtn.o loc("/lib/x86_64-linux-gnu/libc.so":1:1): error: unexpected character PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEBUG tools/CMakeFiles/not.dir/not.cpp.o -o tools/not #0 0x000064b890eb6d41 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Unix/Signals.inc:804:11 #1 0x000064b890eb723b PrintStackTraceSignalHandler(void*) /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Unix/Signals.inc:880:1 #2 0x000064b890eb49a6 llvm::sys::RunSignalHandlers() /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Signals.cpp:105:5 llvm#3 0x000064b890eb7a1d SignalHandler(int, siginfo_t*, void*) /home/erickilmer/src/instafix-llvm/llvm/lib/Support/Unix/Signals.inc:418:7 llvm#4 0x00007c3845445330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330) llvm#5 0x000064b883cd967c llvm::Value::getType() const /home/erickilmer/src/instafix-llvm/llvm/include/llvm/IR/Value.h:255:34 llvm#6 0x000064b88fc554d2 llvm::CastInst::castIsValid(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*) /home/erickilmer/src/instafix-llvm/llvm/include/llvm/IR/InstrTypes.h:623:31 llvm#7 0x000064b890752419 llvm::ConstantExpr::getBitCast(llvm::Constant*, llvm::Type*, bool) /home/erickilmer/src/instafix-llvm/llvm/lib/IR/Constants.cpp:2325:3 llvm#8 0x000064b887051e16 mlir::LLVM::detail::getLLVMConstant(llvm::Type*, mlir::Attribute, mlir::Location, mlir::LLVM::ModuleTranslation const&) /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:602:5 llvm#9 0x000064b88705bb47 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1465:25 llvm#10 0x000064b88705eea3 mlir::LLVM::ModuleTranslation::convertFunctions() /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1804:16 llvm#11 0x000064b88706144d mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef, bool) /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:2218:25 llvm#12 0x000064b883ba2fda instafix::Loader::LinkInstafixLLVM() /home/erickilmer/src/instafix/instafix/lib/instafix.cpp:837:7 llvm#13 0x000064b883bd9dc2 instafix::LLDLoader::NativeLinkAndJIT(int, llvm::ArrayRef<char const*>, bool) /home/erickilmer/src/instafix/instafix/lib/LLDLoader.cpp:42:27 llvm#14 0x000064b883b9d649 instafix::instafix_main(int, char**) /home/erickilmer/src/instafix/instafix/lib/instafix.cpp:264:32 llvm#15 0x000064b883b99992 main /home/erickilmer/src/instafix/bin/instafix-front/Main.cpp:25:3 llvm#16 0x00007c384542a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3 llvm#17 0x00007c384542a28b call_init ./csu/../csu/libc-start.c:128:20 llvm#18 0x00007c384542a28b __libc_start_main ./csu/../csu/libc-start.c:347:5 llvm#19 0x000064b883b998a5 _start (/home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front+0x688a8a5) Segmentation fault (core dumped) ``` with gdb stacktrace: ``` $ cd build $ gdb --args /home/erickilmer/src/instafix/out/build/linux/bin/instafix-front/instafix-front --ld-path=instafix-lld-tool --for-linker=--fake-executable=/home/erickilmer/src/instafix/out/build/linux/bin/instafix-ld/instafix-ld -O3 -DNDEBUG tools/CMakeFiles/not.dir/not.cpp.o -o tools/not [...] (gdb) r [...] Thread 1 "instafix-front" received signal SIGSEGV, Segmentation fault. llvm::Value::getType (this=0x0) at /home/erickilmer/src/instafix-llvm/llvm/include/llvm/IR/Value.h:255 255 Type *getType() const { return VTy; } (gdb) bt #0 llvm::Value::getType (this=0x0) at /home/erickilmer/src/instafix-llvm/llvm/include/llvm/IR/Value.h:255 #1 0x0000555567e9a4d2 in llvm::CastInst::castIsValid (op=llvm::Instruction::BitCast, S=0x0, DstTy=0x555569811470) at /home/erickilmer/src/instafix-llvm/llvm/include/llvm/IR/InstrTypes.h:623 #2 0x0000555568997419 in llvm::ConstantExpr::getBitCast (C=0x0, DstTy=0x555569811470, OnlyIfReduced=false) at /home/erickilmer/src/instafix-llvm/llvm/lib/IR/Constants.cpp:2325 llvm#3 0x000055555f296e16 in mlir::LLVM::detail::getLLVMConstant (llvmType=0x555569811470, attr=..., loc=..., moduleTranslation=...) at /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:602 llvm#4 0x000055555f2a0b47 in mlir::LLVM::ModuleTranslation::convertOneFunction (this=0x7fffffff3710, func=...) at /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1465 llvm#5 0x000055555f2a3ea3 in mlir::LLVM::ModuleTranslation::convertFunctions (this=0x7fffffff3710) at /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1804 llvm#6 0x000055555f2a644d in mlir::translateModuleToLLVMIR (module=0x5555697e32b0, llvmContext=..., name=..., disableVerification=false) at /home/erickilmer/src/instafix-llvm/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:2218 llvm#7 0x000055555bde7fda in instafix::Loader::LinkInstafixLLVM (this=0x55556979ea80) at /home/erickilmer/src/instafix/instafix/lib/instafix.cpp:837 llvm#8 0x000055555be1edc2 in instafix::LLDLoader::NativeLinkAndJIT (this=0x55556979ea80, argc=7, argv=..., exec=false) at /home/erickilmer/src/instafix/instafix/lib/LLDLoader.cpp:42 llvm#9 0x000055555bde2649 in instafix::instafix_main (argc=8, argv=0x7fffffffccc8) at /home/erickilmer/src/instafix/instafix/lib/instafix.cpp:264 llvm#10 0x000055555bdde992 in main (argc=8, argv=0x7fffffffccc8) at /home/erickilmer/src/instafix/bin/instafix-front/Main.cpp:25 ```
No description provided.