Repository navigation
Negative zero broken on ≥ v10.4.0 #25221
Description
Activity
- addedv8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
on Dec 26, 2018 - added a commit that references this issue
on Dec 26, 2018 to be clear, the issue is that
-0evaluates to0, it's not a bug withObject.isorconsole.log.If it helps, this bug seems to persist after the function is optimized by TurboFan and therefore it's likely not an Ignition bug.
@TimothyGu this seems to be fixed on v11.5.0 as well:
> $ node -v v11.5.0 > $ node -e "console.log(Object.is(-0, 0))" false
@ryzokuken You have to use the spread operator prior to the evaluation of -0 to make the bug surface.
@TimothyGu I'd already tried that:I see. Will try to investigate.
> $ node > [...[]]; console.log(Object.is(-0, 0)); true undefined
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.
Reacted by Timothy Gu and Mike McNeil@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?
- added a commit that references this issue
on May 2, 2019 This appears to be fixed in 10.x. Closing
V8 versions between 6.7 and 7.0 (inclusive) have a bug where
prints
truerather thanfalse. 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