intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 46 forks source link

[NNAPI] Crash happened when setting the 'index' value is equal or greater than the size of inputs/ouputs #94

Closed Christywl closed 5 years ago

Christywl commented 5 years ago

Test Env: Chromium Version : nightly build 65.0.3324.0 (revision f9e1a31) OS : Android 8.1.0;Pixel 2

Expected Result: No crash happens

Actual Result: Crash happened when setting the 'index' value is equal or greater than the size of inputs/ouputs

How to reproduce:

  1. Launch chromium and enable WebML flag
  2. Run test case on Chromium: a. https://brucedai.github.io/nt/test/setinput_neg.html b. https://brucedai.github.io/nt/test/setoutput_neg.html c. https://brucedai.github.io/nt/test/execution.html

Run the test with single mode(a or b), sometimes it passed, sometimes it crashed. Run it with other Execution tests(c), it always crashed.

Test Cases:

  1. raise error when the value being set to \'index\' is equal or greater than the size of inputs: https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Execution.js#L69
  2. raise error when the value being set to \'index\' is equal or greater than the size of output https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Execution.js#L358

execution_crash.log

Christywl commented 5 years ago

Reopen this issue because chromium crashed sometimes. Updated the description above and added the crash log in the issue.

sunlin-link commented 5 years ago

@BruceDai This bug should be fixed by previous commits. Please verify with latest build again.

Christywl commented 5 years ago

I checked it with the Chromium nightly build(8fcce67), this issue wasn't reproduced, so close it.