Closed Bug 1578876 Opened 2 months ago Closed 2 months ago

check_vanilla_allocations.py detects 'operator new(unsigned' present in Decimal.o with C++17

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The test output says:

[task 2019-09-04T20:44:15.142Z] TEST-UNEXPECTED-FAIL | check_vanilla_allocations.py | 'operator new(unsigned' present in Decimal.o
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: Source lines with allocation calls:
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: Accurate in unoptimized builds; jsutil.cpp expected.
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: operator new[](unsigned long) called at /builds/worker/workspace/build/src/js/src/jsutil.cpp:158
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: operator new(unsigned long) called at /builds/worker/workspace/build/src/js/src/jsutil.cpp:156
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: memalign called at /builds/worker/workspace/build/src/js/src/jsutil.cpp:158
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: operator new[](unsigned long) called at /builds/worker/workspace/build/src/js/src/vm/ProfilingStack.cpp:34
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: operator new(unsigned long) called at /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/new_allocator.h:111
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: memalign called at /builds/worker/workspace/build/src/memory/build/malloc_decls.h:55
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: memalign called at /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:113
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: operator new(unsigned long) called at /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/new_allocator.h:111
[task 2019-09-04T20:44:15.142Z] check_vanilla_allocations.py: operator new(unsigned long) called at /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/new_allocator.h:111
[task 2019-09-04T20:44:15.149Z] Makefile:21: recipe for target 'check-vanilla-allocations' failed

I guess the test is trying to make sure nothing in the JS engine calls new, except for a few allowed sites. I don't know why Decimal.o has suddenly decided to start calling operator new (there are no source calls)...is it OK in this case because Decimal.o lives in mozglue?

Flags: needinfo?(n.nethercote)

This is for the fuzzing build, so maybe we should just turn off the test in such builds?

There is a whitelist here. This script predates mozglue; mozglue things can be ignored. I suggest using the whitelist.

I'll give you a gold star if you update the big comment at the top of the script to explain the mozglue exception.

Flags: needinfo?(n.nethercote)
Type: task → defect
Priority: -- → P1

Calls to these allocation functions from mozglue can generally be ignored.

Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6c32350b0c1
add exception for Decimal code to check_vanilla_allocations.py; r=njn
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → nfroyd
You need to log in before you can comment on or make changes to this bug.