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

No such function within the flex project #289

Open
MarkLee131 opened this issue May 21, 2024 · 2 comments
Open

No such function within the flex project #289

MarkLee131 opened this issue May 21, 2024 · 2 comments

Comments

@MarkLee131
Copy link
Contributor

Hi, I found that there is an API main2 to test within flex project, as shown in

However, there doesn't seem to be such a function in this project, and experiments to generate drivers for it always fail.
Can you confirm whether it's a typo (perhaps the correct one is main) or any other problem that's causing this?

@oliverchang
Copy link
Collaborator

@DavidKorczynski @DonggeLiu can you please take a look?

@DavidKorczynski
Copy link
Collaborator

This happens because the OSS-Fuzz build for flex patches the main function to enable analysis: https://github.com/google/oss-fuzz/blob/74e3c9413ac02ea72bc3be161096a390f05de846/projects/flex/build.sh#L26 As such, there is a main2 function in the binary artifacts build by the OSS-Fuzz set up, and this is the one reported.

Likely this happens because flex is not a library as such but more of a command line application, and the libfuzzer engine has its own main function, so any other mains need to be silenced.

I can think of a few solutions but they all seem a bit hacky.

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

3 participants