Closed Bug 1408459 Opened 6 years ago Closed 6 years ago

Remove unused declaration of NS_MeanAndStdDev()

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(2 files)

Despite the comment on this method saying "And now for that utility that you've all been asking for..." this is not used or defined anywhere.
Comment on attachment 8918394 [details]
Bug 1408459, part 1 - Work around compiler problem on Android 4.2 x86 opt.

https://reviewboard.mozilla.org/r/189214/#review194502

lgtm
Attachment #8918394 - Flags: review?(erahm) → review+
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e2a919fabb6a
Remove unused declaration of NS_MeanAndStdDev(). r=erahm
Backed out for build bustage on Android 4.2 x86 opt: invalid conversion:

https://hg.mozilla.org/integration/autoland/rev/c4b56772f6490b3bbb69fb99fe085313b587cc4c

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=e2a919fabb6aefe155764cf091888539c4693c24&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Build log: https://treeherder.mozilla.org/logviewer.html#?job_id=136862121&repo=autoland

task 2017-10-13T17:58:30.624Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2598:52:   required from 'std::__ndk1::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = std::__ndk1::__function::__base<void(PRFileDesc*)>; _Dp = std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)> > >]'
[task 2017-10-13T17:58:30.625Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/functional:1603:72:   required from 'std::__ndk1::function<_Rp(_ArgTypes ...)>::function(_Fp, typename std::__ndk1::enable_if<(std::__ndk1::function<_Rp(_ArgTypes ...)>::__callable<_Fp>::value && (! std::__ndk1::is_same<_Fp, std::__ndk1::function<_Rp(_ArgTypes ...)> >::value))>::type*) [with _Fp = mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>; _Rp = void; _ArgTypes = {PRFileDesc*}; typename std::__ndk1::enable_if<(std::__ndk1::function<_Rp(_ArgTypes ...)>::__callable<_Fp>::value && (! std::__ndk1::is_same<_Fp, std::__ndk1::function<_Rp(_ArgTypes ...)> >::value))>::type = void]'
[task 2017-10-13T17:58:30.625Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/dom/media/FileBlockCache.cpp:108:59:   required from here
[task 2017-10-13T17:58:30.626Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2630:34: error: invalid conversion from 'std::__ndk1::unique_ptr<std::__ndk1::__function::__base<void(PRFileDesc*)>, std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)> > > >::pointer {aka std::__ndk1::__function::__base<void(PRFileDesc*)>*}' to 'std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)> > >::pointer {aka std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)>*}' [-fpermissive]
[task 2017-10-13T17:58:30.626Z] 17:58:30     INFO -               __ptr_.second()(__tmp);
[task 2017-10-13T17:58:30.627Z] 17:58:30     INFO -                                    ^
Flags: needinfo?(continuation)
This is bizarre. Note that it is only Android 4.2 and not other versions. It was in fact fixed by the backout. Maybe I'll figure out which part of my change caused this. Or maybe just WONTFIX this... Though I should add a comment at least. In IRC, botond said that he's seen this before: "basically, we've landed on the conclusion that it's undefined behaviour in the compiler, and subtly shifting code around can trigger it".
Flags: needinfo?(continuation)
See Also: → 1367798
I too have seen problems like this on Android -- inexplicable compile errors involving huge templates containing std::__ndk1::__function.
Disabling unified compilation for CubebUtils.cpp fixes the build:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5d86c79465e6a50eb5520bb3db1829eb9bf83a0a
Part 2 is the same as the previous patch...
Comment on attachment 8918681 [details]
Bug 1408459, part 2 - Remove unused declaration of NS_MeanAndStdDev().

https://reviewboard.mozilla.org/r/189498/#review194676
Attachment #8918681 - Flags: review?(erahm) → review+
Comment on attachment 8918394 [details]
Bug 1408459, part 1 - Work around compiler problem on Android 4.2 x86 opt.

https://reviewboard.mozilla.org/r/189214/#review195160
Attachment #8918394 - Flags: review?(dglastonbury) → review+
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de35e0d32738
part 1 - Work around compiler problem on Android 4.2 x86 opt. r=erahm,kamidphish
https://hg.mozilla.org/integration/autoland/rev/a55ef97febd9
part 2 - Remove unused declaration of NS_MeanAndStdDev(). r=erahm
You need to log in before you can comment on or make changes to this bug.