The Wayback Machine - https://web.archive.org/web/20201128085034/https://github.com/microsoft/ChakraCore/issues/6519
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An issue about the Math.max(). #6519

Open
NWU-NISL opened this issue Oct 8, 2020 · 0 comments
Open

An issue about the Math.max(). #6519

NWU-NISL opened this issue Oct 8, 2020 · 0 comments

Comments

@NWU-NISL
Copy link

@NWU-NISL NWU-NISL commented Oct 8, 2020

When 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

@NWU-NISL NWU-NISL changed the title An issue about the Matn.max(). An issue about the Math.max(). Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.