An issue about the Math.max().
See original GitHub issueWhen I passed NaN and an object with the “valueOf” attribute value as a callable function to the first and second parameters of Math.max, chakra did not execute this function. According to the ES10 standard, the ToNumber operation is performed on each parameter of Math.max, and the “valueOf” attribute value function of the second parameter will be executed.
version
chakra-1_11_22
command
ChakraCore/out/Debug/ch testcase.js
testcase
var NISLFuzzingFunc = function(){
var a = {
valueOf: function(){
print(1);
}
};
var b = Math.max(NaN,a);
};
NISLFuzzingFunc();
Output
No output.
Expected behavior
Output 1.
Contributor : @Haobin-Lee
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Math.max() - JavaScript - MDN Web Docs
The Math.max() function returns the largest of the numbers given as input parameters, or -Infinity if there are no parameters.
Read more >An issue about the Math.max(). · Issue #781 · mozilla/rhino · GitHub
Description. When I passed NaN and an object with the "valueOf" attribute value as a callable function to the first and second parameters...
Read more >JavaScript Math max() Method - GeeksforGeeks
The JavaScript Math max() Method is used to return the largest of zero or more numbers. The result is “-Infinity” if no arguments...
Read more >Why Math.max() is Less Than Math.min() in JavaScript
So, Math.max() starts with a search value of -Infinity , because any other number is going to be greater than -Infinity. Similarly, ...
Read more >JavaScript Math max() Method - W3Schools
Definition and Usage. The Math. max() method returns the number with the highest value.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is this issue resolved? Can I try to work on this?
@rhuanjl Can We do this?