Skip to content
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

assert error in getNonOpaquePointerElementType #1841

Open
Zzhiter opened this issue Nov 27, 2024 · 14 comments
Open

assert error in getNonOpaquePointerElementType #1841

Zzhiter opened this issue Nov 27, 2024 · 14 comments

Comments

@Zzhiter
Copy link

Zzhiter commented Nov 27, 2024

Hello, after following the steps of local build and compiling clang, I get an error when running it:
image

It seems to be a problem with this API?
image

My LLVM version is release/15.x

@oiiio
Copy link

oiiio commented Dec 3, 2024

(not a very experienced C/C++ user)

I have tried throwing in some flags like -opaque-pointers=0 but I still get the same error. Bump to this problem

@DavidKorczynski
Copy link
Contributor

Hey! Apologies for the delay here

@DavidKorczynski
Copy link
Contributor

I'll push a fix tonight!

The main reason I didn't do it is that we are rapidly moving to a new frontend that doesn't rely on LLVM LTO. The plan is to deprecate the LTO logic before end of the year, and rely on a pure static (no building) approach. The C logic is more or less ready in https://github.com/ossf/fuzz-introspector/tree/main/frontends/light but we need to get C++ working as well.

@Zzhiter
Copy link
Author

Zzhiter commented Dec 11, 2024

May I ask if this problem has been fixed?

@DavidKorczynski
Copy link
Contributor

Apologies for the delay! I'll look at this tomorrow, Friday

@DavidKorczynski
Copy link
Contributor

I'm looking at this now -- does this issue happen when running the build_all.sh script?

Also, which checkout specifically do you use of LLVM? i.e. what do you have on this line?

git checkout llvmorg-18-init-14420-gea3a3b25

@Zzhiter
Copy link
Author

Zzhiter commented Dec 15, 2024

Thank you! No, I meet this issue when following the LocalBuild:
image

I use 939f5a33711370697f9ad1de4267cfc7399dfe86 commit of LLVM, which is release/15.x.

@AnnabellaM
Copy link

I also ran into the same error when I was following the installation instructions on this webpage https://fuzz-introspector.readthedocs.io/en/latest/installation-instructions/installation.html. The same error occurred when I ran this command FUZZ_INTROSPECTOR=1 ../../../build/llvm-build/bin/clang -fsanitize=fuzzer \ -fuse-ld=gold -flto -g ../fuzzer.c -o fuzzer

@DavidKorczynski
Copy link
Contributor

DavidKorczynski commented Dec 21, 2024

@Zzhiter can you confirm which checkout specifically do you use of LLVM? i.e. what do you have on this line

git checkout llvmorg-18-init-14420-gea3a3b25
?

Nvm, I see you mention the commit now, thanks!

@seokjeon
Copy link

I am encountering the same issue.
if this is in WIP, Could you let me know what is the most recent stable version of fuzz-introspector that I can use?
Thanks.

@kd610
Copy link
Contributor

kd610 commented Feb 7, 2025

Same here - when I followed the installation on this webpage https://fuzz-introspector.readthedocs.io/en/latest/installation-instructions/installation.html and run the command "FUZZ_INTROSPECTOR=1 ../../../build/llvm-build/bin/clang -fsanitize=fuzzer \ -fuse-ld=gold -flto -g ../fuzzer.c -o fuzzer". However, I got the same error below.

:Type::getNonOpaquePointerElementType() const: Assertion `NumContainedTys && "Attempting to get element type of opaque pointer"' failed.
clang-15: error: unable to execute command: Aborted
clang-15: error: linker command failed due to signal (use -v to see invocation)

It would be amazing if you could solve this issue! Thank you in advance.

@DavidKorczynski
Copy link
Contributor

Many apologies for the delay here. I was confused why release/15.x. was the used version but following #1841 (comment) I was reminded this is what the docs specify. I had forgotten to update the docs -- again, apologies. The short story is we have progressed to a more recent LLVM version.

I've updated the sphinx logic to include the correct installation procedure: https://fuzz-introspector.readthedocs.io/en/latest/installation-instructions/installation.html#installation

Let me know if this works for you.

I will revisit the Sphinx doc further this week since we have made some more progress, in particular on non-lto based analysis which will make it a lot easier to build tools based of Fuzz Introspector.

@kd610
Copy link
Contributor

kd610 commented Feb 11, 2025

Thank you so much for your quick reply and for updating the document, @DavidKorczynski !

I shall indeed try to re-install and do it again to see whether it actually works without that issue or not.

Have a nice day!

@kd610
Copy link
Contributor

kd610 commented Feb 11, 2025

Hi @DavidKorczynski; thank you again for updating the installation section. It worked on my side (I have tested the installation in C/C++, especially for Option 1) 😁. However, I just found one missing command to execute the following scripts without any issues. I have made a PR #2086, so it would be great if you could review it.

I’d appreciate your feedback and thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants