You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux 4.9.0-8-amd64 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
Subsystem: v8
V8 versions between 6.7 and 7.0 (inclusive) have a bug where
[...[]];console.log(Object.is(-0,0));
prints true rather than false. This is reproducible with all Node.js versions after 10.4.0, though it is fixed on master which uses V8 7.1. We should find the V8 commit that fixes this and backport it to LTS at the very least.
/cc @devsnek, who helped triage this bug
/cc @nodejs/v8
@BridgeAR I think what @targos means is that since this isn't an isolated fix but a huge change, it won't be great idea to backport the whole commit. Had it been a smaller commit, I guess it would have been simpler.
Activity
Remove invalid excluded tests
devsnek commentedon Dec 26, 2018
to be clear, the issue is that
-0evaluates to0, it's not a bug withObject.isorconsole.log.bnoordhuis commentedon Dec 27, 2018
If it helps, this bug seems to persist after the function is optimized by TurboFan and therefore it's likely not an Ignition bug.
ryzokuken commentedon Dec 27, 2018
@TimothyGu this seems to be fixed on v11.5.0 as well:
TimothyGu commentedon Dec 27, 2018
@ryzokuken You have to use the spread operator prior to the evaluation of -0 to make the bug surface.
ryzokuken commentedon Dec 27, 2018
@TimothyGu I'd already tried that:I see. Will try to investigate.
targos commentedon Dec 28, 2018
This was fixed as a side-effect in v8/v8@1c48d52.
That's a big change that we probably won't be able to backport.
BridgeAR commentedon Dec 29, 2018
@targos there do not seem to be a lot of conflicts in that commit when backprorting it to v11.
@nodejs/v8 @psmarshall @bmeurer @hashseed would you be so kind and check what is required to backport the necessary commit?
ryzokuken commentedon Dec 29, 2018
@BridgeAR I think what @targos means is that since this isn't an isolated fix but a huge change, it won't be great idea to backport the whole commit. Had it been a smaller commit, I guess it would have been simpler.
mikermcneil commentedon May 2, 2019
-0 is broken in Node 10, so skip test and instead add comment with li…
BridgeAR commentedon May 2, 2019
jasnell commentedon Jun 26, 2020
This appears to be fixed in 10.x. Closing