Bug 1723245 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Try server revision ea8a407a0f9a or its parent fb639ed5a772 on the [SM(fuzzing) job](https://treeherder.mozilla.org/jobs?repo=try&author=sfink%40mozilla.com&selectedTaskRun=A_cqB1L9R8KZZgFUCcJKFA.0):
```
[task 2021-07-29T17:56:45.957Z]  3:59.27 js/src/build/libmozjs-92a1.so
[task 2021-07-29T17:56:54.452Z]  4:07.76 /usr/bin/ld: ../StructuredClone.o: in function `sancov.module_ctor_8bit_counters':
[task 2021-07-29T17:56:54.453Z]  4:07.76 StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0x4): undefined reference to `__start___sancov_cntrs'
[task 2021-07-29T17:56:54.454Z]  4:07.77 /usr/bin/ld: StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0xb): undefined reference to `__stop___sancov_cntrs'
[task 2021-07-29T17:56:54.455Z]  4:07.77 /usr/bin/ld: StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0x17): undefined reference to `__start___sancov_pcs'
[task 2021-07-29T17:56:54.456Z]  4:07.77 /usr/bin/ld: StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0x1e): undefined reference to `__stop___sancov_pcs'
```
(followed by lots of `/usr/bin/ld: DWARF error: ...` errors).

ea8a407a0f9a is the try push rev. Parent fb639ed5a772 has the problematic changes. Grandparent 0896ae409c2c is fine.

I have not managed to reproduce in my local dev environment, but I can reproduce it with a docker image matching that job.

The failure happens while linking `libmozjs-92a1.so`. In either the good or bad revisions, all of the object files that go into it have the same undefined symbols:
```
                 U __start___sancov_cntrs
                 U __start___sancov_pcs
                 U __stop___sancov_cntrs
                 U __stop___sancov_pcs
```
In the good revision, the successful `libmozjs-92a1.so` contains:
```
0000000004d1f490 d __start___sancov_cntrs
0000000004d57850 d __start___sancov_pcs
0000000004d5784f d __stop___sancov_cntrs
00000000050486f0 d __stop___sancov_pcs
```

The command line is:
```
/builds/worker/fetches/clang/bin/clang++ --sysroot /builds/worker/fetches/sysroot-x86_64-linux-gnu -std=gnu++17 -U_FORTIFY_SOURCE -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wshadow-uncaptured-local -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fsanitize=address -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gline-tables-only -gdwarf-2 -Xclang -load -Xclang /builds/worker/checkouts/gecko/obj-spider/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror  -shared -Wl,--gc-sections -Wl,-h,libmozjs-92a1.so -o libmozjs-92a1.so /builds/worker/checkouts/gecko/obj-spider/js/src/build/libmozjs-92a1_so.list   -lpthread -fsanitize=fuzzer-no-link -rdynamic -fsanitize=address -rdynamic -Wl,-rpath-link,/builds/worker/fetches/sysroot-x86_64-linux-gnu/lib/x86_64-linux-gnu -Wl,-rpath-link,/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -Wl,-Bsymbolic -Wl,-rpath-link,/builds/worker/checkouts/gecko/obj-spider/dist/bin -Wl,-rpath-link,/builds/worker/checkouts/gecko/obj-spider/dist/lib  /builds/worker/checkouts/gecko/obj-spider/x86_64-unknown-linux-gnu/release/libjsrust.a ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so -Wl,--version-script,symverscript  -lm  -lz -lm -ldl/builds/worker/checkouts/gecko/obj-spider/x86_64-unknown-linux-gnu/release/libjsrust.a
```

The source code changes add some templatized classes to some header files, implement a few of their methods, and update macro uses in a couple of files.
Try server revision ea8a407a0f9a or its parent fb639ed5a772 on the [SM(fuzzing) job](https://treeherder.mozilla.org/jobs?repo=try&author=sfink%40mozilla.com&selectedTaskRun=A_cqB1L9R8KZZgFUCcJKFA.0):
```
[task 2021-07-29T17:56:45.957Z]  3:59.27 js/src/build/libmozjs-92a1.so
[task 2021-07-29T17:56:54.452Z]  4:07.76 /usr/bin/ld: ../StructuredClone.o: in function `sancov.module_ctor_8bit_counters':
[task 2021-07-29T17:56:54.453Z]  4:07.76 StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0x4): undefined reference to `__start___sancov_cntrs'
[task 2021-07-29T17:56:54.454Z]  4:07.77 /usr/bin/ld: StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0xb): undefined reference to `__stop___sancov_cntrs'
[task 2021-07-29T17:56:54.455Z]  4:07.77 /usr/bin/ld: StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0x17): undefined reference to `__start___sancov_pcs'
[task 2021-07-29T17:56:54.456Z]  4:07.77 /usr/bin/ld: StructuredClone.cpp:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit_counters]+0x1e): undefined reference to `__stop___sancov_pcs'
```
(followed by lots of `/usr/bin/ld: DWARF error: ...` errors).

ea8a407a0f9a is the try push rev. Parent fb639ed5a772 has the problematic changes. Grandparent 0896ae409c2c is fine.

I have not managed to reproduce in my local dev environment, but I can reproduce it with a docker image matching that job.

The failure happens while linking `libmozjs-92a1.so`. In either the good or bad revisions, 37 of the object files that go into it have the same undefined symbols:
```
                 U __start___sancov_cntrs
                 U __start___sancov_pcs
                 U __stop___sancov_cntrs
                 U __stop___sancov_pcs
```
In the good revision, the successful `libmozjs-92a1.so` contains:
```
0000000004d1f490 d __start___sancov_cntrs
0000000004d57850 d __start___sancov_pcs
0000000004d5784f d __stop___sancov_cntrs
00000000050486f0 d __stop___sancov_pcs
```

The command line is:
```
/builds/worker/fetches/clang/bin/clang++ --sysroot /builds/worker/fetches/sysroot-x86_64-linux-gnu -std=gnu++17 -U_FORTIFY_SOURCE -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wshadow-uncaptured-local -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fsanitize=address -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gline-tables-only -gdwarf-2 -Xclang -load -Xclang /builds/worker/checkouts/gecko/obj-spider/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror  -shared -Wl,--gc-sections -Wl,-h,libmozjs-92a1.so -o libmozjs-92a1.so /builds/worker/checkouts/gecko/obj-spider/js/src/build/libmozjs-92a1_so.list   -lpthread -fsanitize=fuzzer-no-link -rdynamic -fsanitize=address -rdynamic -Wl,-rpath-link,/builds/worker/fetches/sysroot-x86_64-linux-gnu/lib/x86_64-linux-gnu -Wl,-rpath-link,/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -Wl,-Bsymbolic -Wl,-rpath-link,/builds/worker/checkouts/gecko/obj-spider/dist/bin -Wl,-rpath-link,/builds/worker/checkouts/gecko/obj-spider/dist/lib  /builds/worker/checkouts/gecko/obj-spider/x86_64-unknown-linux-gnu/release/libjsrust.a ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so -Wl,--version-script,symverscript  -lm  -lz -lm -ldl/builds/worker/checkouts/gecko/obj-spider/x86_64-unknown-linux-gnu/release/libjsrust.a
```

The source code changes add some templatized classes to some header files, implement a few of their methods, and update macro uses in a couple of files.

Back to Bug 1723245 Comment 0