pytorch/test/cpp
PaDarochek b00d388ada Update test_misc.cpp (#97768)
Potential null dereference after dynamic cast was found during static analysis.

**Description:**
Dereference of `ctx` is performed in `TORCH_CHECK` on line 1176, while `ctx` pointer may equal `nullptr`.
Previous `TORCH_CHECK` on line 1175 checks the value of `ctx_ptr` pointer that may be of type that cannot be casted to `TestContext*`. In such case, `dynamic_cast` returns `nullptr` despite `ctx_ptr` is not equal to `nullptr`.

**Fix:**

- Check `ctx` instead of `ctx_ptr` for equality to zero.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97768
Approved by: https://github.com/kit1980
2023-06-13 16:14:11 +00:00
..
aot_inductor Switch AOT Inductor test to export, add dynamic, fix invocation bug (#101585) 2023-05-17 05:52:08 +00:00
api Re enable AutogradNotImplementedFallback on Windows (#101062) 2023-05-15 13:41:06 +00:00
c10d [small BE] update NcclTest dim size (#101127) 2023-05-15 23:05:10 +00:00
common
dist_autograd set -Wsuggest-override for builds (#89852) 2022-12-19 22:08:47 +00:00
jit Update test_misc.cpp (#97768) 2023-06-13 16:14:11 +00:00
lazy std/var: support floating point correction value (#94073) 2023-02-23 05:50:45 +00:00
lite_interpreter_runtime [BE] [3/3] Rewrite super() calls in test (#94592) 2023-02-12 22:20:53 +00:00
monitor
profiler [Profiler] Fix SOFT_ASSERT test to not raise on debug builds (#91464) 2022-12-30 05:31:03 +00:00
rpc Refactor distribuetd to use absolute header path (#85780) 2022-09-30 05:13:50 +00:00
tensorexpr Revert "Added round_with_scale_factor arg to ATen (#97868)" 2023-04-28 20:47:00 +00:00
__init__.py