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

libreoffice builds failure at link: ld.gold: internal error in read_header_prolog #8629

Closed
caolanm opened this issue Sep 29, 2022 · 3 comments

Comments

@caolanm
Copy link
Contributor

caolanm commented Sep 29, 2022

recent libreoffice builds are failing with:

/usr/bin/ld.gold: internal error in read_header_prolog, at ../../gold/dwarf_reader.cc:1678

which isn't something I've seen happen before. Any recent toolchain changes?

https://oss-fuzz-build-logs.storage.googleapis.com/log-167cddd9-b6ab-42a3-bc59-b787c25f4f97.txt

@oliverchang
Copy link
Collaborator

Not sure we're familiar with this one unfortunately. @jonathanmetzman have you seen this before?

@jonathanmetzman
Copy link
Contributor

Nope

@caolanm
Copy link
Contributor Author

caolanm commented Oct 6, 2022

@caolanm caolanm closed this as completed Oct 6, 2022
AdamKorcz pushed a commit that referenced this issue Aug 26, 2023
This enables fuzz introspector for lua.

The [current
build](https://oss-fuzz-build-logs.storage.googleapis.com/log-95e09fbf-701e-4adf-ad25-8629c7dd5f8a.txt)
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
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