Shadow mapping breaks after 2 minutes

What i discovered so far:
The code responsible is in directional light shadowmap update
const sceneBboxInLightSpace = aabb.fromPoints(bboxPointsInLightSpace)
const lightNear = -sceneBboxInLightSpace[1][2]
const lightFar = -sceneBboxInLightSpace[0][2]
light.set({
_near: lightNear,
_far: lightFar
})
When the bug appears the near/far values are invalid (identical)
instead of usual
Points are definitely not identical and yet aabb.fromtPoints returns 2x last point
abb.fromPoints function from pex-geom seems to be ok
function fromPoints (points) {
var aabb = create()
var min = aabb[0]
var max = aabb[1]
for (var i = 0, len = points.length; i < len; i++) {
var p = points[i]
min[0] = Math.min(min[0], p[0])
min[1] = Math.min(min[1], p[1])
min[2] = Math.min(min[2], p[2])
max[0] = Math.max(max[0], p[0])
max[1] = Math.max(max[1], p[1])
max[2] = Math.max(max[2], p[2])
}
return aabb
}
Running code 3x returns different results 0_o

Putting debugger at the end prints 3x same invalid result !!!

Where it happens?
- Only Safari 12.1, MacOS 10.14.4
- Chrome, can't reproduce
- Firefox, can't reproduce
Is this Safari JIT bug?
Added test cases
Expected

Broken

Visit in Safari with dev tools opened and leave for few minutes. Whenever it encouters the bug (near == far) it will stop at debugger statement. No interaction is required, just leave the tab in the foreground. Wait for the hdr envmap to load.
Possible fix is to replace https://github.com/pex-gl/pex-geom/blob/master/aabb.js#L27
1. len variable inline, crashing after few min
http://marcinignac.com/experiments/noise-strokes/for-inline/
for (var i = 0, len = points.length; i < len; i++) {
2. using array length, crashing
http://marcinignac.com/experiments/noise-strokes/for-length/
for (var i = 0; i < points.length; i++) {
3. declaring var len, crashing
http://marcinignac.com/experiments/noise-strokes/for-declare/
var len = points.length
for (var i = 0; i < len; i++) {
4. added try catch around fromPoints code to deoptimize the function, crashing
http://marcinignac.com/experiments/noise-strokes/for-deopt/
Note: apparently that has to be around function call not the body
5. while looop, crashing
http://marcinignac.com/experiments/noise-strokes/for-while/
var len = points.length
let i = 0
while (i < len) {
var p = points[i]
6. const everywhere
http://marcinignac.com/experiments/noise-strokes/for-const/
const min = [Infinity, Infinity, Infinity]
const max = [-Infinity, -Infinity, -Infinity]
for (let i = 0; i < points.length; i++) {
const p = points[i]
7. no create(), crashing
http://marcinignac.com/experiments/noise-strokes/for-no-infinity/
if (!points.length) {
return create()
}
const min = [points[0][0], points[0][1], points[0][2]]
const max = [points[0][0], points[0][1], points[0][2]]
for (let i = 1; i < points.length; i++) {
const p = points[i]
@vorg please test if we can still recreate it