Closed Bug 1613985 Opened 6 years ago Closed 5 years ago

Make constructors/destructors/assignment operators use =default

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: sg, Assigned: sg)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(84 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
34.18 KB, image/png
Details

Constructors/destructors/assignment operators that are essentially trivial should use = default instead of having an otherwise equivalent user-provided implementation (i.e. empty for default constructors and destructors), so that they can be recognized as such by the compiler and by type traits.

This might be achieved semi-automatically by applying the fix-it hints for the modernize-use-equals-default clang-tidy check and fixing resulting quirks.

Summary: Ensure types are not superficially non-trivially constructible/destructible → Ensure types are not superficially non-trivially constructible/destructible/assignable

For consistency and simplicity, = default can also be used in cases where the type is not trivially constructible/assignable. In particular, for copy/move operations, a custom implementation that is equivalent to the compiler-generated version should prefer using = default to improve readability.

Summary: Ensure types are not superficially non-trivially constructible/destructible/assignable → Make constructors/destructors/assignment operators use =default
Status: NEW → ASSIGNED
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/549958c6f356 Use default for equivalent-to-default constructors/destructors in dom/localstorage. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5638cf5460f4 Use default for equivalent-to-default constructors/destructors in dom/quota. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96cdc48fb667 Use default for equivalent-to-default constructors/destructors in dom/indexedDB. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f805278e33e Use default for equivalent-to-default constructors/destructors in dom/serviceworkers. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/92d089d7c09e Use default for equivalent-to-default constructors/destructors in dom/storage. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e4333f29090d Use default for equivalent-to-default constructors/destructors in dom/filehandle. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/209112ce8f8c Use default for equivalent-to-default constructors/destructors in dom/workers. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f3d9fbb2daf1 Use default for equivalent-to-default constructors/destructors in mfbt. r=froydnj
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/801309bb74ba Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/54b875aa3376 Use default for equivalent-to-default constructors/destructors in accessibility. r=smaug https://hg.mozilla.org/integration/autoland/rev/fb71b48cbe07 Use default for equivalent-to-default constructors/destructors in caps. r=smaug https://hg.mozilla.org/integration/autoland/rev/836e66cccf21 Use default for equivalent-to-default constructors/destructors in docshell. r=smaug https://hg.mozilla.org/integration/autoland/rev/3d27ad6aefe3 Use default for equivalent-to-default constructors/destructors in dom/commandhandler. r=smaug https://hg.mozilla.org/integration/autoland/rev/d396cbfc0edf Use default for equivalent-to-default constructors/destructors in dom/crypto. r=smaug
Flags: needinfo?(sgiesecke)
Keywords: leave-open

This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Depends on D62603

Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8cac7720815 Use default for equivalent-to-default constructors/destructors in dom/credentialmanagement. r=mccr8

Simon, are you planning to enforce that? (ie make it an error once everything is fixed)
thanks for doing that btw :)

Flags: needinfo?(sgiesecke)

(In reply to Sylvestre Ledru [:Sylvestre] from comment #33)

Simon, are you planning to enforce that? (ie make it an error once everything is fixed)
thanks for doing that btw :)

I think we could do that, but not everyone might agree? But at least until now, no one complained, but I still have a number of patches in the queue for other parts of the code base.

Before we can make this an error, we need to resolve two issues here:

  • There are false positives with unions.
  • There are some cases which intentionally have non-trivial constructors or destructors. E.g. when making them trivial, unused variable warnings result.

I guess the first one could easily be fixed. Maybe there is already a fix in the most recent clang-tidy version.]

The second one could either be addressed by generic NOLINT comments, or alternatively with a custom annotation (but in the latter case we definitely need a custom patch for this clang-tidy analysis).

Flags: needinfo?(sgiesecke)
Attachment #9126138 - Attachment description: Bug 1613985 - Add macros to conditionally default destructor that only calls MOZ_COUNT_DTOR. r=froydnj → Bug 1613985 - Add macros to conditionally default ctor/dtor that only calls MOZ_COUNT_CTOR/MOZ_COUNT_DTOR. r=froydnj
Attachment #9126139 - Attachment description: Bug 1613985 - Use MOZ_COUNTED_DTOR_* macros. r=froydnj → Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj

Here's one example that couldn't be changed: https://phabricator.services.mozilla.com/D62542#inline-377894

Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b61bb41f31d1 Use default for equivalent-to-default constructors/destructors in mfbt. r=froydnj
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/34eea73b7b4b Use default for equivalent-to-default constructors/destructors in ipc. r=jld
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d2e26bdf818c Use default for equivalent-to-default constructors/destructors in dom/canvas. r=jgilbert
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb6d62b7f28d Add macros to conditionally default ctor/dtor that only calls MOZ_COUNT_CTOR/MOZ_COUNT_DTOR. r=froydnj https://hg.mozilla.org/integration/autoland/rev/fd177b40b561 Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/febd600b2dc1 Add macros to conditionally default ctor/dtor that only calls MOZ_COUNT_CTOR/MOZ_COUNT_DTOR. r=froydnj https://hg.mozilla.org/integration/autoland/rev/e51615a01049 Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
Flags: needinfo?(sgiesecke)
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b64f17a5e742 Use default for equivalent-to-default constructors/destructors in dom/bindings. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/527613723b2b Use default for equivalent-to-default constructors/destructors in dom/xhr. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37175549c456 Use default for equivalent-to-default constructors/destructors in dom/url. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6fb8c8d916eb Use default for equivalent-to-default constructors/destructors in dom/xul. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f004606659ea Use default for equivalent-to-default constructors/destructors in dom/geolocation. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/825166c62dc9 Use default for equivalent-to-default constructors/destructors in dom/gamepad. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/180bde4e3f29 Use default for equivalent-to-default constructors/destructors in dom/filesystem. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2667c0880c2 Use default for equivalent-to-default constructors/destructors in dom/events. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/675f799493f2 Use default for equivalent-to-default constructors/destructors in dom/cache. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7f3bbff254b5 Use default for equivalent-to-default constructors/destructors in dom/audiochannel. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/890d8155867a Use default for equivalent-to-default constructors/destructors in dom/animation. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e6a7aba3192 Use default for equivalent-to-default constructors/destructors in dom/broadcastchannel. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/62c14f0e5543 Use default for equivalent-to-default constructors/destructors in dom/clients. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f925231f4617 Use default for equivalent-to-default constructors/destructors in dom/console. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be7b77d14703 Use default for equivalent-to-default constructors/destructors in dom/encoding. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6b63b6c6851a Use default for equivalent-to-default constructors/destructors in dom/file. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5ea6a6160cd7 Use default for equivalent-to-default constructors/destructors in dom/grid. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3140aecfe861 Use default for equivalent-to-default constructors/destructors in dom/html. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/74b85171afe6 Use default for equivalent-to-default constructors/destructors in dom/fetch. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1cdb349d96ce Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Priority: -- → P3
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6aa0e0dad01b Use default for equivalent-to-default constructors/destructors in dom/vr. r=smaug https://hg.mozilla.org/integration/autoland/rev/39ae265a3356 Use default for equivalent-to-default constructors/destructors in dom/xml. r=smaug https://hg.mozilla.org/integration/autoland/rev/393ef8822156 Use default for equivalent-to-default constructors/destructors in dom/performance. r=smaug https://hg.mozilla.org/integration/autoland/rev/b7db84d69210 Use default for equivalent-to-default constructors/destructors in dom/smil. r=smaug https://hg.mozilla.org/integration/autoland/rev/80fa88f5b74b Use default for equivalent-to-default constructors/destructors in dom/security. r=smaug https://hg.mozilla.org/integration/autoland/rev/b80a2371a761 Use default for equivalent-to-default constructors/destructors in dom/power. r=smaug https://hg.mozilla.org/integration/autoland/rev/32d92b9330c9 Use default for equivalent-to-default constructors/destructors in editor. r=masayuki https://hg.mozilla.org/integration/autoland/rev/0dcf880b3bdf Use default for equivalent-to-default constructors/destructors in image. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/4da3e28df605 Use default for equivalent-to-default constructors/destructors in intl. r=hsivonen
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8bdb82bfc20 Use default for equivalent-to-default constructors/destructors in dom/media. r=padenot https://hg.mozilla.org/integration/autoland/rev/0194aff14e50 Use default for equivalent-to-default constructors/destructors in gfx. r=jrmuizel
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c8620247a5e Fix bustage on PathHelpers.h. r=fix CLOSED TREE
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/67e20c1982b1 Use default for equivalent-to-default constructors/destructors in dom/ipc. r=smaug https://hg.mozilla.org/integration/autoland/rev/d181a67c72df Use default for equivalent-to-default constructors/destructors in dom/plugins. r=smaug https://hg.mozilla.org/integration/autoland/rev/07b96fa0f04f Use default for equivalent-to-default constructors/destructors in media. r=bwc https://hg.mozilla.org/integration/autoland/rev/57352ebe1f1d Use default for equivalent-to-default constructors/destructors in netwerk. r=dragana
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae9ff80929d8 Use default for equivalent-to-default constructors/destructors in dom/jsurl. r=smaug https://hg.mozilla.org/integration/autoland/rev/226b4bc945b1 Use default for equivalent-to-default constructors/destructors in dom/mathml. r=smaug https://hg.mozilla.org/integration/autoland/rev/cbf5d740a6ef Use default for equivalent-to-default constructors/destructors in dom/messagechannel. r=smaug https://hg.mozilla.org/integration/autoland/rev/af9706f349a1 Use default for equivalent-to-default constructors/destructors in dom/midi. r=smaug https://hg.mozilla.org/integration/autoland/rev/f161f25688fb Use default for equivalent-to-default constructors/destructors in dom/network. r=smaug https://hg.mozilla.org/integration/autoland/rev/6741fde33ece Use default for equivalent-to-default constructors/destructors in dom/notification. r=smaug https://hg.mozilla.org/integration/autoland/rev/9f7db587ca0b Use default for equivalent-to-default constructors/destructors in dom/payments. r=smaug https://hg.mozilla.org/integration/autoland/rev/7f6fadbe8ee5 Use default for equivalent-to-default constructors/destructors in dom/presentation. r=smaug https://hg.mozilla.org/integration/autoland/rev/ae9dc45e160e Use default for equivalent-to-default constructors/destructors in dom/promise. r=smaug https://hg.mozilla.org/integration/autoland/rev/2f35c9ed8c68 Use default for equivalent-to-default constructors/destructors in dom/push. r=smaug https://hg.mozilla.org/integration/autoland/rev/7c7b064da5ea Use default for equivalent-to-default constructors/destructors in dom/script. r=smaug https://hg.mozilla.org/integration/autoland/rev/7a3000732bab Use default for equivalent-to-default constructors/destructors in dom/simpledb. r=smaug https://hg.mozilla.org/integration/autoland/rev/45ba0325210a Use default for equivalent-to-default constructors/destructors in dom/system. r=smaug https://hg.mozilla.org/integration/autoland/rev/a0611bc10390 Use default for equivalent-to-default constructors/destructors in dom/webauthn. r=smaug https://hg.mozilla.org/integration/autoland/rev/cc552e5f242c Use default for equivalent-to-default constructors/destructors in dom/webbrowserpersist. r=smaug https://hg.mozilla.org/integration/autoland/rev/c5d3c641af83 Use default for equivalent-to-default constructors/destructors in dom/websocket. r=smaug https://hg.mozilla.org/integration/autoland/rev/a8095b111df5 Use default for equivalent-to-default constructors/destructors in dom/worklet. r=smaug https://hg.mozilla.org/integration/autoland/rev/8fa877de54cc Use default for equivalent-to-default constructors/destructors in dom/permission. r=smaug https://hg.mozilla.org/integration/autoland/rev/0c1e3f4c6a2e Use default for equivalent-to-default constructors/destructors in dom/xslt. r=smaug
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f298c1cbaeaf Use default for equivalent-to-default constructors/destructors in startupcache. r=nika https://hg.mozilla.org/integration/autoland/rev/c6c3ec3568c7 Use default for equivalent-to-default constructors/destructors in toolkit. r=mossop https://hg.mozilla.org/integration/autoland/rev/c5c9a4a05340 Use default for equivalent-to-default constructors/destructors in mozglue. r=glandium https://hg.mozilla.org/integration/autoland/rev/5a653aeba71c Use default for equivalent-to-default constructors/destructors in xpfe. r=mstange https://hg.mozilla.org/integration/autoland/rev/99d6961f2d92 Use default for equivalent-to-default constructors/destructors in tools. r=mstange
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/847433cf1e0a Use default for equivalent-to-default constructors/destructors in widget. r=jmathies https://hg.mozilla.org/integration/autoland/rev/41e858fbf235 Use default for equivalent-to-default constructors/destructors in js. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/8605d7a19107 Use default for equivalent-to-default constructors/destructors in storage. r=asuth https://hg.mozilla.org/integration/autoland/rev/fba0caac746c Use default for equivalent-to-default constructors/destructors in security. r=rrelyea
Backout by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/956f70566375 Backed out 4 changesets for causing build bustages CLOSED TREE

Backed out 4 changesets (Bug 1613985) for causing build bustages
Seeing 2 apparently different bustages: Hazard and Bbc.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception&fromchange=fb90c9d681983e815377955166855f659b510005&searchStr=build%2Clinux&tochange=956f705663758405f2c027b1f3dba82f60f90589&selectedJob=293298244

Backout link: https://hg.mozilla.org/integration/autoland/rev/956f705663758405f2c027b1f3dba82f60f90589

Failure log:
Hazard: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=293298234&repo=autoland&lineNumber=9519

...
[task 2020-03-16T10:18:15.417Z] ANALYZED_OBJDIR='/builds/worker/workspace/obj-analyzed' SOURCE='/builds/worker/checkouts/gecko' PATH="/builds/worker/fetches/sixgill/usr/bin:${PATH}" XDB='/builds/worker/fetches/sixgill/usr/bin/xdb.so' LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/builds/worker/workspace/obj-haz-shell/dist/bin" /builds/worker/workspace/obj-haz-shell/dist/bin/js /builds/worker/checkouts/gecko/js/src/devtools/rootAnalysis/analyzeRoots.js gcFunctions.lst gcEdges.txt limitedFunctions.lst gcTypes.txt typeInfo.txt 15 15 tmp.15 > rootingHazards.15
[task 2020-03-16T10:18:15.417Z] cat rootingHazards.1 rootingHazards.2 rootingHazards.3 rootingHazards.4 rootingHazards.5 rootingHazards.6 rootingHazards.7 rootingHazards.8 rootingHazards.9 rootingHazards.10 rootingHazards.11 rootingHazards.12 rootingHazards.13 rootingHazards.14 rootingHazards.15 > rootingHazards.txt
[task 2020-03-16T10:18:15.417Z] Running explain to generate ('hazards.txt', 'unnecessary.txt', 'refs.txt')
[task 2020-03-16T10:18:15.417Z] ANALYZED_OBJDIR='/builds/worker/workspace/obj-analyzed' SOURCE='/builds/worker/checkouts/gecko' PATH="/builds/worker/fetches/sixgill/usr/bin:${PATH}" XDB='/builds/worker/fetches/sixgill/usr/bin/xdb.so' LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/builds/worker/workspace/obj-haz-shell/dist/bin" python2.7 /builds/worker/checkouts/gecko/js/src/devtools/rootAnalysis/explain.py rootingHazards.txt gcFunctions.txt hazards.txt unnecessary.txt refs.txt
[task 2020-03-16T10:18:15.564Z] Wrote explained_hazards.tmp
[task 2020-03-16T10:18:15.564Z] Wrote unnecessary.tmp
[task 2020-03-16T10:18:15.564Z] Wrote refs.tmp
[task 2020-03-16T10:18:15.564Z] Found 1 hazards 75 unsafe references 0 missing
[task 2020-03-16T10:18:15.565Z] Running heapwrites to generate heapWriteHazards.txt
[task 2020-03-16T10:18:15.565Z] ANALYZED_OBJDIR='/builds/worker/workspace/obj-analyzed' SOURCE='/builds/worker/checkouts/gecko' PATH="/builds/worker/fetches/sixgill/usr/bin:${PATH}" XDB='/builds/worker/fetches/sixgill/usr/bin/xdb.so' LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/builds/worker/workspace/obj-haz-shell/dist/bin" /builds/worker/workspace/obj-haz-shell/dist/bin/js /builds/worker/checkouts/gecko/js/src/devtools/rootAnalysis/analyzeHeapWrites.js > heapWriteHazards.txt
[task 2020-03-16T10:18:18.467Z] + check_hazards /builds/worker/workspace/analysis
[task 2020-03-16T10:18:18.467Z] + set +e
[task 2020-03-16T10:18:18.467Z] ++ grep -c 'Function.*has unrooted.*live across GC call' /builds/worker/workspace/analysis/rootingHazards.txt
[task 2020-03-16T10:18:18.469Z] + NUM_HAZARDS=1
[task 2020-03-16T10:18:18.469Z] ++ grep -c '^Function.*takes unsafe address of unrooted' /builds/worker/workspace/analysis/refs.txt
[task 2020-03-16T10:18:18.470Z] + NUM_UNSAFE=75
[task 2020-03-16T10:18:18.470Z] ++ grep -c '^Function.* has unnecessary root' /builds/worker/workspace/analysis/unnecessary.txt
[task 2020-03-16T10:18:18.472Z] + NUM_UNNECESSARY=1069
[task 2020-03-16T10:18:18.472Z] ++ grep -c '^Dropped CFG' /builds/worker/workspace/analysis/build_xgill.log
[task 2020-03-16T10:18:18.475Z] + NUM_DROPPED=0
[task 2020-03-16T10:18:18.476Z] ++ perl -lne 'print $1 if m!found (\d+)/\d+ allowed errors!' /builds/worker/workspace/analysis/heapWriteHazards.txt
[task 2020-03-16T10:18:18.477Z] + NUM_WRITE_HAZARDS=0
[task 2020-03-16T10:18:18.477Z] ++ grep -c '^Function.*expected hazard.*but none were found' /builds/worker/workspace/analysis/rootingHazards.txt
[task 2020-03-16T10:18:18.478Z] + NUM_MISSING=0
[task 2020-03-16T10:18:18.478Z] + set +x
[task 2020-03-16T10:18:18.478Z] TinderboxPrint: rooting hazards<br/>1
[task 2020-03-16T10:18:18.478Z] TinderboxPrint: (unsafe references to unrooted GC pointers)<br/>75
[task 2020-03-16T10:18:18.478Z] TinderboxPrint: (unnecessary roots)<br/>1069
[task 2020-03-16T10:18:18.478Z] TinderboxPrint: missing expected hazards<br/>0
[task 2020-03-16T10:18:18.478Z] TinderboxPrint: heap write hazards<br/>0
[task 2020-03-16T10:18:18.480Z] TEST-UNEXPECTED-FAIL | hazards | unrooted 'next' of type 'js::DictionaryShapeLink' live across GC call at js/src/vm/Shape.cpp:505
[task 2020-03-16T10:18:18.480Z] TEST-UNEXPECTED-FAIL | hazards | 1 rooting hazards detected
[task 2020-03-16T10:18:18.480Z] TinderboxPrint: documentation<br/><a href='https://wiki.mozilla.org/Javascript:Hazard_Builds#Diagnosing_a_rooting_hazards_failure'>static rooting hazard analysis failures</a>, visit "Inspect Task" link for hazard details
[task 2020-03-16T10:18:18.480Z] + onexit
...

Bbc: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=293298244&repo=autoland&lineNumber=59938

[task 2020-03-16T10:22:24.264Z] 10:22:24     INFO -  make[4]: Entering directory '/builds/worker/workspace/obj-build/js/src/shell'
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -o ../../../dist/bin/js -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fno-omit-frame-pointer -funwind-tables -Werror  /builds/worker/workspace/obj-build/js/src/shell/js.list    -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -fstack-protector-strong -rdynamic -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/bin -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/lib   ../build/libjs_static.a /builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/debug/libjsrust.a -pie ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so -lm -ldl  -lrt -lm -ldl -Wl,--version-script,/builds/worker/checkouts/gecko/build/unix/stdc++compat/hide_std.ld
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: Unified_cpp_js_src_shell0.o: in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: Unified_cpp_js_src_shell0.o: in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderContext>::~BinASTParser()':
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderContext>::~BinASTParser()':
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:24.267Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../dist/bin/js: hidden symbol `_ZN2js8frontend24BinASTParserPerTokenizerINS0_26BinASTTokenReaderMultipartEED2Ev' isn't defined
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  /builds/worker/fetches/binutils/bin/ld: final link failed: bad value
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:462: recipe for target '../../../dist/bin/js' failed
[task 2020-03-16T10:22:24.268Z] 10:22:24    ERROR -  make[4]: *** [../../../dist/bin/js] Error 1
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/shell'
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'js/src/shell/target' failed
[task 2020-03-16T10:22:24.268Z] 10:22:24    ERROR -  make[3]: *** [js/src/shell/target] Error 2
[task 2020-03-16T10:22:24.268Z] 10:22:24     INFO -  make[3]: *** Waiting for unfinished jobs....
[task 2020-03-16T10:22:25.413Z] 10:22:25     INFO -  make[4]: Entering directory '/builds/worker/workspace/obj-build/js/src/jsapi-tests'
[task 2020-03-16T10:22:25.413Z] 10:22:25     INFO -  /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -o ../../../dist/bin/jsapi-tests -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fno-omit-frame-pointer -funwind-tables -Werror  /builds/worker/workspace/obj-build/js/src/jsapi-tests/jsapi-tests.list    -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -fstack-protector-strong -rdynamic -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/bin -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/lib   ../build/libjs_static.a /builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/debug/libjsrust.a -pie ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so -lm -ldl  -lrt -lm -ldl -Wl,--version-script,/builds/worker/checkouts/gecko/build/unix/stdc++compat/hide_std.ld
[task 2020-03-16T10:22:25.413Z] 10:22:25     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:25.413Z] 10:22:25     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:25.413Z] 10:22:25     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderContext>::~BinASTParser()':
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/fetches/binutils/bin/ld: /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../dist/bin/jsapi-tests: hidden symbol `_ZN2js8frontend24BinASTParserPerTokenizerINS0_26BinASTTokenReaderMultipartEED2Ev' isn't defined
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/fetches/binutils/bin/ld: final link failed: bad value
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:462: recipe for target '../../../dist/bin/jsapi-tests' failed
[task 2020-03-16T10:22:25.414Z] 10:22:25    ERROR -  make[4]: *** [../../../dist/bin/jsapi-tests] Error 1
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/jsapi-tests'
[task 2020-03-16T10:22:25.414Z] 10:22:25     INFO -  /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'js/src/jsapi-tests/target' failed
[task 2020-03-16T10:22:25.414Z] 10:22:25    ERROR -  make[3]: *** [js/src/jsapi-tests/target] Error 2
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  make[4]: Entering directory '/builds/worker/workspace/obj-build/js/src/gdb'
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -o ../../../dist/bin/gdb-tests -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fno-omit-frame-pointer -funwind-tables -Werror  /builds/worker/workspace/obj-build/js/src/gdb/gdb-tests.list    -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -fstack-protector-strong -rdynamic -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/bin -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/lib   ../build/libjs_static.a /builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/debug/libjsrust.a -pie ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so -lm -ldl  -lrt -lm -ldl -Wl,--version-script,/builds/worker/checkouts/gecko/build/unix/stdc++compat/hide_std.ld
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderContext>::~BinASTParser()':
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/binutils/bin/ld: /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderContext>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/binutils/bin/ld: ../build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../dist/bin/gdb-tests: hidden symbol `_ZN2js8frontend24BinASTParserPerTokenizerINS0_26BinASTTokenReaderMultipartEED2Ev' isn't defined
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/fetches/binutils/bin/ld: final link failed: bad value
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:462: recipe for target '../../../dist/bin/gdb-tests' failed
[task 2020-03-16T10:22:26.575Z] 10:22:26    ERROR -  make[4]: *** [../../../dist/bin/gdb-tests] Error 1
[task 2020-03-16T10:22:26.575Z] 10:22:26     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/gdb'
[task 2020-03-16T10:22:26.576Z] 10:22:26     INFO -  /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'js/src/gdb/target' failed
[task 2020-03-16T10:22:26.576Z] 10:22:26    ERROR -  make[3]: *** [js/src/gdb/target] Error 2
[task 2020-03-16T10:23:12.142Z] 10:23:12     INFO -  make[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/gtest'
[task 2020-03-16T10:23:12.142Z] 10:23:12     INFO -  /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Os -fno-omit-frame-pointer -funwind-tables -Werror  -fPIC -shared -Wl,-z,defs -Wl,--gc-sections -Wl,-h,libxul.so -o libxul.so /builds/worker/workspace/obj-build/toolkit/library/gtest/libxul_so.list   -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -fstack-protector-strong -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/bin -Wl,-rpath-link,/usr/local/lib   ../../../security/nss/lib/crmf/crmf_crmf/libcrmf.a ../../../js/src/build/libjs_static.a /builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/debug/libgkrust_gtest.a ../../../security/sandbox/linux/libmozsandbox.so ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so ../../../config/external/lgpllibs/liblgpllibs.so ../../../security/nss/lib/nss/nss_nss3/libnss3.so ../../../security/nss/lib/util/util_nssutil3/libnssutil3.so ../../../security/nss/lib/smime/smime_smime3/libsmime3.so ../../../config/external/sqlite/libmozsqlite3.so ../../../security/nss/lib/ssl/ssl_ssl3/libssl3.so ../../../widget/gtk/mozgtk/stub/libmozgtk_stub.so -Wl,--version-script,symverscript  -ldl  -lrt -lm -lX11 -lX11-xcb -lxcb -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lpthread -ldl -lc -lfreetype -lfontconfig -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgio-2.0 -lxcb-shm -lpangoft2-1.0 -lXt -lgthread-2.0 -Wl,--version-script,/builds/worker/checkouts/gecko/build/unix/stdc++compat/hide_std.ld
[task 2020-03-16T10:23:12.142Z] 10:23:12     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:23:12.142Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:23:12.142Z] 10:23:12     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend0.o): relocation R_X86_64_PC32 against undefined hidden symbol `_ZN2js8frontend24BinASTParserPerTokenizerINS0_26BinASTTokenReaderMultipartEED2Ev' can not be used when making a shared object
[task 2020-03-16T10:23:12.143Z] 10:23:12     INFO -  /builds/worker/fetches/binutils/bin/ld: final link failed: bad value
[task 2020-03-16T10:23:12.143Z] 10:23:12     INFO -  clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
[task 2020-03-16T10:23:12.143Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:608: recipe for target 'libxul.so' failed
[task 2020-03-16T10:23:12.143Z] 10:23:12    ERROR -  make[4]: *** [libxul.so] Error 1
[task 2020-03-16T10:23:12.143Z] 10:23:12     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/gtest'
[task 2020-03-16T10:23:12.143Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'toolkit/library/gtest/target' failed
[task 2020-03-16T10:23:12.143Z] 10:23:12    ERROR -  make[3]: *** [toolkit/library/gtest/target] Error 2
[task 2020-03-16T10:23:12.344Z] 10:23:12     INFO -  make[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2020-03-16T10:23:12.344Z] 10:23:12     INFO -  /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Os -fno-omit-frame-pointer -funwind-tables -Werror  -fPIC -shared -Wl,-z,defs -Wl,--gc-sections -Wl,-h,libxul.so -o libxul.so /builds/worker/workspace/obj-build/toolkit/library/build/libxul_so.list   -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -fstack-protector-strong -Wl,-rpath-link,/builds/worker/workspace/obj-build/dist/bin -Wl,-rpath-link,/usr/local/lib   ../../../security/nss/lib/crmf/crmf_crmf/libcrmf.a ../../../js/src/build/libjs_static.a /builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/debug/libgkrust.a ../../../security/sandbox/linux/libmozsandbox.so ../../../config/external/nspr/pr/libnspr4.so ../../../config/external/nspr/libc/libplc4.so ../../../config/external/nspr/ds/libplds4.so ../../../config/external/lgpllibs/liblgpllibs.so ../../../security/nss/lib/nss/nss_nss3/libnss3.so ../../../security/nss/lib/util/util_nssutil3/libnssutil3.so ../../../security/nss/lib/smime/smime_smime3/libsmime3.so ../../../config/external/sqlite/libmozsqlite3.so ../../../security/nss/lib/ssl/ssl_ssl3/libssl3.so ../../../widget/gtk/mozgtk/stub/libmozgtk_stub.so -Wl,--version-script,symverscript  -ldl  -lrt -lm -lX11 -lX11-xcb -lxcb -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lpthread -ldl -lc -lfreetype -lfontconfig -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgio-2.0 -lxcb-shm -lpangoft2-1.0 -lXt -lgthread-2.0 -Wl,--version-script,/builds/worker/checkouts/gecko/build/unix/stdc++compat/hide_std.ld
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend0.o): in function `js::frontend::BinASTParser<js::frontend::BinASTTokenReaderMultipart>::~BinASTParser()':
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/js/src/frontend/BinASTParser.h:72: undefined reference to `js::frontend::BinASTParserPerTokenizer<js::frontend::BinASTTokenReaderMultipart>::~BinASTParserPerTokenizer()'
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  /builds/worker/fetches/binutils/bin/ld: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend0.o): relocation R_X86_64_PC32 against undefined hidden symbol `_ZN2js8frontend24BinASTParserPerTokenizerINS0_26BinASTTokenReaderMultipartEED2Ev' can not be used when making a shared object
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  /builds/worker/fetches/binutils/bin/ld: final link failed: bad value
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:608: recipe for target 'libxul.so' failed
[task 2020-03-16T10:23:12.345Z] 10:23:12    ERROR -  make[4]: *** [libxul.so] Error 1
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2020-03-16T10:23:12.345Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'toolkit/library/build/target' failed
[task 2020-03-16T10:23:12.345Z] 10:23:12    ERROR -  make[3]: *** [toolkit/library/build/target] Error 2
[task 2020-03-16T10:23:12.346Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/config/recurse.mk:32: recipe for target 'compile' failed
[task 2020-03-16T10:23:12.346Z] 10:23:12    ERROR -  make[2]: *** [compile] Error 2
[task 2020-03-16T10:23:12.346Z] 10:23:12     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:394: recipe for target 'default' failed
[task 2020-03-16T10:23:12.346Z] 10:23:12    ERROR -  make[1]: *** [default] Error 2
[task 2020-03-16T10:23:12.346Z] 10:23:12     INFO -  client.mk:125: recipe for target 'build' failed
[task 2020-03-16T10:23:12.346Z] 10:23:12     INFO -  make: *** [build] Error 2
[task 2020-03-16T10:23:12.353Z] 10:23:12     INFO -  322 compiler warnings present.
[task 2020-03-16T10:23:12.621Z] 10:23:12     INFO -  Notification center failed: Install notify-send (usually part of the libnotify package) to get a notification when the build finishes.
[task 2020-03-16T10:23:12.663Z] 10:23:12    ERROR - Return code: 2
[task 2020-03-16T10:23:12.663Z] 10:23:12  WARNING - setting return code to 2
[task 2020-03-16T10:23:12.663Z] 10:23:12    FATAL - 'mach build -v' did not run successfully. Please check log for errors.
[task 2020-03-16T10:23:12.663Z] 10:23:12    FATAL - Running post_fatal callback...
[task 2020-03-16T10:23:12.663Z] 10:23:12    FATAL - Exiting -1
[task 2020-03-16T10:23:12.664Z] 10:23:12     INFO - [mozharness: 2020-03-16 10:23:12.663972Z] Finished build step (failed)
...
Flags: needinfo?(sgiesecke)
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/087e9f9efed0 Use default for equivalent-to-default constructors/destructors in widget. r=jmathies https://hg.mozilla.org/integration/autoland/rev/e4d136fe9733 Use default for equivalent-to-default constructors/destructors in js. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/fd7acd328d12 Use default for equivalent-to-default constructors/destructors in storage. r=asuth https://hg.mozilla.org/integration/autoland/rev/0d18c1f7fb5b Use default for equivalent-to-default constructors/destructors in security. r=rrelyea

Note: when reviewing the layout patch, I'm noticing that we're ending up with a lot of lines like this in .cpp files:

nsPageBreakFrame::~nsPageBreakFrame() = default;

(...where this patch has replaced {} with = default;)

These lines end up feeling kinda silly & extraneous now... I think originally with {} the goal was to provide a spot where you could place a gdb breakpoint, but I suspect (?) that doesn't work now that they're = default. (though maybe it does? I haven't tried.)

Anyway -- it might be nice to do a followup bug, with a grep for ::~ followed by default on the same line, to find candidates like the above where we can clean up a bit by moving the default up to the function declaration inside of the scope of the struct/class {...} section. Not super high-priority, just a possible next-step here.

Keywords: leave-open

(In reply to Daniel Holbert [:dholbert] from comment #151)

Note: when reviewing the layout patch, I'm noticing that we're ending up with a lot of lines like this in .cpp files:

nsPageBreakFrame::~nsPageBreakFrame() = default;

(...where this patch has replaced {} with = default;)

These lines end up feeling kinda silly & extraneous now...

I think originally with {} the goal was to provide a spot where you could place a gdb breakpoint, but I suspect (?) that doesn't work now that they're = default. (though maybe it does? I haven't tried.)

I am not sure if you can set a line breakpoint, but unless the destructor is being inlined, still a regular function is generated, which you can set a breakpoint in by name.

Anyway -- it might be nice to do a followup bug, with a grep for ::~ followed by default on the same line, to find candidates like the above where we can clean up a bit by moving the default up to the function declaration inside of the scope of the struct/class {...} section. Not super high-priority, just a possible next-step here.

Yes, that is certainly a good follow-up cleanup: note that this might not be possible in all cases, where some member's destructor's definition is not available in the header. In several cases, the destructor declaration is entirely redundant and can be removed, i.e. when it is public and not explicitly declared virtual. There is no automated tool available which does this, which is why I didn't do this as part of this bug.

Blocks: 1623028
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/16033ddd2457 Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Attached image Impact of this work

Well done!

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: