在ios平台出现错误
int w = 128;
int h = 128;
int target_width = 144;
int target_height = 144;
unsigned char* pixels = (unsigned char*)malloc(w*3*h);
ncnn::Mat::from_pixels_resize(pixels, ncnn::Mat::PIXEL_RGB2BGR, w, h, target_width, target_height);
如上,不是每一次都会出错,是偶现的,w=256,h=256也会出现同样的问题,目前我们是把resize的neon关闭,才能避免此问题。
同问下
1、ncnn::resize_bilinear_c1(unsigned char const, int, int, unsigned char, int, int), mat_pixel_resize.cpp,line 156,col 31
2、ncnn::conv3x3s1_neon(ncnn::Mat const&, ncnn::Mat&, ncnn::Mat const&, ncnn::Mat const&, ncnn::Option const&), convolution_3x3.h,line 90,col 17
3、ncnn::resize_bilinear_c3(unsigned char const, int, int, unsigned char, int, int), mat_pixel_resize.cpp,line 716,col 33
这几个地方是高危区
bilinear resize c2 c3 的 hresize 有越界读操作(并没有使用),某些硬件上会导致 crash
同样256*256 crash,换了新版本解决
Most helpful comment
fixed in https://github.com/Tencent/ncnn/commit/e56f0d47cc9957dae3806d7667402ca78e4b93ce