Commit e365e15
Add input size validation to Module.execute (#10701)
### Summary
Adds input size validation to `Module.execute` to prevent possible
silent memory corruption when too many EValue inputs are passed.
Fixes #10510
### Test plan
- Added unit test `TestExecuteWithTooManyInputs`
- Verified by successfully running all `module_test.cpp` tests, except
`TestPTD` (did not have access to `ModuleLinear.ptd`)
- To run locally:
- Bypass `is_fbcode` guard in `targets.bzl` and redirect test file paths
to use a locally exported `ModuleAdd.pte` file
- Build and run tests via:
```
buck2 build //extension/module/test:test
buck2 run //extension/module/test:test
---------
Co-authored-by: Anthony Shoumikhin <[email protected]>1 parent a905728 commit e365e15
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
219 | 229 | | |
220 | 230 | | |
221 | 231 | | |
| |||
0 commit comments