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

lua: enable fuzz introspector #10891

Merged
merged 1 commit into from
Aug 26, 2023
Merged

lua: enable fuzz introspector #10891

merged 1 commit into from
Aug 26, 2023

Conversation

DavidKorczynski
Copy link
Collaborator

This enables fuzz introspector for lua.

The current build fails with:

Step #6 - "compile-libfuzzer-introspector-x86_64": [Log level 1] : 10:13:22 : This means a main function is in the source code rather in the libfuzzer library, and thus we do not care about it. We only want to study the actual fuzzers. Exiting this run.
Step #6 - "compile-libfuzzer-introspector-x86_64": /usr/bin/ld.gold: internal error in read_header_prolog, at ../../gold/dwarf_reader.cc:1678
Step #6 - "compile-libfuzzer-introspector-x86_64": clang-15: fatal error: linker command failed with exit code 1 (use -v to see invocation)
Step #6 - "compile-libfuzzer-introspector-x86_64": make: *** [makefile:119: lua] Error 1
Step #6 - "compile-libfuzzer-introspector-x86_64": 

At first I thought this was an issue of multiple-definitions since the error is the same as: #8629 However, allowing multiple definitions didn't work.

I'm not entirely sure why this fixes the problem. It was through trial and error I came up with the fix. I assume it may be some ASAN gets compiled in somehow during non-ASAN builds and this causes issues for the gold linker (but not in non-gold linkers, i.e. coverage and other sanitizers are fine).

This fixes the introspector build, but also adds ASAN instrumentation which bloats the calltrees, but the function table is good.

I tried setting LDFLAGS=-fsanitizer=address but this didn't work in the case of Lua. I have some ideas, however, to fix this. Will pursue that at a later stage.

Ref: #10882

@AdamKorcz AdamKorcz merged commit ecff0de into master Aug 26, 2023
@AdamKorcz AdamKorcz deleted the DavidKorczynski-patch-8 branch August 26, 2023 18:59
DavidKorczynski pushed a commit that referenced this pull request Aug 15, 2024
Fuzz Introspector build is failing with error:
```
/usr/bin/ld.gold: internal error in read_header_prolog, at ../../gold/dwarf_reader.cc:1678
```

- I have tried solutions mentioned here
##10891 and saw this issue
##10237 but doesnt seem to be
the same cause.

- so instead i will just build it with `lld` instead of the `gold`
linker supplied by the environment
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

Successfully merging this pull request may close these issues.

2 participants