Open Bug 1169271 Opened 5 years ago Updated 2 years ago

Improve code coverage for AtomicsObject.cpp


(Core :: JavaScript Engine, defect, P3)





(Reporter: lth, Unassigned)


(Blocks 1 open bug)


This shows the current coverage:

Coverage is quite low, mainly because:
- some of the atomics callouts for asm.js is not tested, because they are
  only needed for ARMv6
- the futex code is not tested by the current test suite

- error branches (wrong array type, out of bounds) are not exercised

Landing bug 1135026 will help with the futex coverage.  It should also be easy to test the error branches.

The asm.js callouts for ARMv6 can probably only be exercised on other platforms by changing some conditions for their enabling; will need investigating.
On a related note, in MCallOptimize.cpp there is a lack of coverage for double-precision arguments, and for the wrong number of arguments, when inlining atomics:
In CodeGenerator.cpp (search for "atomic") there are some untaken paths, one in CMPXCHG but more notably there appear to be no test cases that trigger the use of LAtomicTypedArrayElementBinopForEffect.
No test case touches the useRegisterAtStart case in LIRGeneratorX86::visitAsmJSAtomicBinopHeap in
Several lacunae in LIRGeneratorX86Shared::lowerAtomicTypedArrayElementBinop in, one having to do with uint32 I think and another having to do with operations for effect.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.