prepack icon indicating copy to clipboard operation
prepack copied to clipboard

`__evaluatePureFunction` doesn't properly validate arguments

Open NTillmann opened this issue 6 years ago • 6 comments

Prepacking the following crashes Prepack.

__evaluatePureFunction("boo");

In the implementation, it shouldn't check via an invariant that the argument is a proper value, but instead it should throw a user-level exception or emit a CompilerDiagnostics error.

NTillmann avatar Aug 03 '18 21:08 NTillmann

Hey @NTillmann I am very new to open source contribution and I would love to work on this issue. Should I go ahead with it?

rahilvora avatar Aug 07 '18 21:08 rahilvora

This one should be easy! Give it a try.

NTillmann avatar Aug 08 '18 19:08 NTillmann

Sure. Will try it :)

rahilvora avatar Aug 08 '18 20:08 rahilvora

PR for this issue: https://github.com/facebook/prepack/pull/2403

rahilvora avatar Aug 11 '18 05:08 rahilvora

@NTillmann Can you please tell which error message I should add for this issues which will help a developer to understand the error https://github.com/facebook/prepack/wiki/Prepack-diagnostics

rahilvora avatar Aug 13 '18 18:08 rahilvora

Just make up a new PP number that isn't used yet. Propose a wiki text in your PR, and then we'll create the wiki page for you when landing the PR.

NTillmann avatar Aug 16 '18 16:08 NTillmann