Bug 14451 - fuzz: oss-fuzz build broken (static/PIC issues with python3.8)
Summary: fuzz: oss-fuzz build broken (static/PIC issues with python3.8)
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL: https://bugs.chromium.org/p/oss-fuzz/...
Depends on:
Reported: 2020-07-28 23:55 UTC by Douglas Bagnall
Modified: 2020-10-15 02:32 UTC (History)
2 users (show)

See Also:

a patch for oss-fuzz that works (927 bytes, patch)
2020-07-30 03:27 UTC, Douglas Bagnall
no flags Details
a patch for Samba's oss-fuzz script (1.06 KB, patch)
2020-07-31 03:41 UTC, Douglas Bagnall
abartlet: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Bagnall 2020-07-28 23:55:20 UTC
This is not the same as the coverage build failure, which I had not noticed until now.

Step #4: /usr/bin/ld: /usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.a(exceptions.o): relocation R_X86_64_32 against `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
Step #4: /usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.a: error adding symbols: Bad value
Step #4: clang-11: error: linker command failed with exit code 1 (use -v to see invocation)


Step #4: 
Step #4: Waf: Leaving directory `/src/samba/bin/default'
Step #4: Build failed
Step #4:  -> task in 'pytalloc-util.cpython-38-x86_64-linux-gnu' failed with exit status 1 (run with -v to display more information)
Step #4: make: *** [all] Error 1
Step #4: Makefile:7: recipe for target 'all' failed
Step #4: ********************************************************************************
Step #4: Failed to build.
Step #4: To reproduce, run:
Step #4: python infra/helper.py build_image samba
Step #4: python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 samba
Step #4: ********************************************************************************
Finished Step #4
ERROR: build step 4 "gcr.io/oss-fuzz/samba" failed: step exited with non-zero status: 1
Comment 1 Douglas Bagnall 2020-07-30 03:27:53 UTC
Created attachment 16153 [details]
a patch for oss-fuzz that works

This patch for OSS-Fuzz works, by making Samba use the ordinary uninstrumented system python.

It is not ideal for 2 reasons:

1. We want instrumentation still.

2. It would be better to keep the code in the Samba repo. (doing it in oss-fuzz is easier to prototype though).
Comment 2 Douglas Bagnall 2020-07-31 03:41:00 UTC
Created attachment 16155 [details]
a patch for Samba's oss-fuzz script

This patch does the same thing on Samba's side.

It is slightly preferred for the same reason that everything else in the script is done on the Samba side -- it is easier for us to maintain when it is in our own repo.
Comment 3 Andrew Bartlett 2020-07-31 03:53:10 UTC
Comment on attachment 16155 [details]
a patch for Samba's oss-fuzz script

Looks plausible.
Comment 4 Douglas Bagnall 2020-10-15 02:32:55 UTC
fixed in 326bc84c0d0f83b4429e78b6c974204116233330