Oneflow-Inc / oneflow

OneFlow is a deep learning framework designed to be user-friendly, scalable and efficient.
http://www.oneflow.org
Apache License 2.0
5.87k stars 667 forks source link

Aborted (core dumped) in flow.nn.AdaptiveMaxPool1d #10498

Open x0w3n opened 5 months ago

x0w3n commented 5 months ago

Summary

When I pass a very large value to flow.nn.AdaptiveMaxPool1d , it crashes. It says that the CPU can't allocate memory and tries to allocate a huge memory size. We believe this is a very serious bug that tries to allocate a large amount of memory and could cause a memory overflow vulnerability.

Code to reproduce bug

import oneflow as flow
flow.nn.AdaptiveMaxPool1d(9132760301568586890)(oneflow.randn([2,2,2]))

image

System Information