opencv/modules
Oliver Kuckertz a3d7811f24
Merge pull request #20725 from mologie:fix-dnn-tf-on-arm
* dnn: fix unaligned memory access crash on armv7

The getTensorContent function would return a Mat pointing to some
member of a Protobuf-encoded message. Protobuf does not make any
alignment guarantees, which results in a crash on armv7 when loading
models while bit 2 is set in /proc/cpu/alignment (or the relevant
kernel feature for alignment compatibility is disabled). Any read
attempt from the previously unaligned data member would send SIGBUS.

As workaround, this commit makes an aligned copy via existing clone
functionality in getTensorContent. The unsafe copy=false option is
removed. Unfortunately, a rather crude hack in PReLUSubgraph in fact
writes(!) to the Protobuf message. We limit ourselves to fixing the
alignment issues in this commit, and add getTensorContentRefUnaligned
to cover the write case with a safe memcpy. A FIXME marks the issue.

* dnn: reduce amount of .clone() calls

* dnn: update FIXME comment

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-06 16:41:05 +00:00
..
calib3d calib3d: Update documentation of calibrateCamera 2021-04-30 20:34:04 +02:00
core Merge pull request #20802 from alalek:core_tls_init_TlsAbstraction 2021-10-06 12:01:06 +00:00
cudaarithm cuda: fix inplace condition in cv::cuda::flip 2021-04-01 02:26:59 +00:00
cudabgsegm fix test failure on Jetson TX2 2020-04-15 23:25:12 +09:00
cudacodec cudacodec(build): fix detection in CMake, cleanup duplicate includes 2020-06-17 09:09:40 +00:00
cudafeatures2d
cudafilters suppress GaussianBlur to generate empty images 2021-10-01 23:17:02 +09:00
cudaimgproc Remove compiler warnings 2020-08-21 23:52:30 +09:00
cudalegacy Merge pull request #19390 from tomoaki0705:fixCudaLegacyCalib3d 2021-01-25 13:32:43 +00:00
cudaobjdetect suppress noisy warning 2019-08-08 21:49:32 +09:00
cudaoptflow fix getDefaultName() 2021-02-15 19:21:53 +06:00
cudastereo cuda::StereoBM - fix hanging and racing issue 2019-02-18 06:03:12 +00:00
cudawarping
cudev Merge pull request #16150 from alalek:cmake_avoid_deprecated_link_private 2019-12-13 17:52:40 +03:00
dnn Merge pull request #20725 from mologie:fix-dnn-tf-on-arm 2021-10-06 16:41:05 +00:00
features2d Merge pull request #20815 from alalek:fix_20649_revert_19859 2021-10-06 15:05:45 +03:00
flann Remove static initializers caused by templated static member. 2021-05-07 12:53:14 -07:00
highgui Merge pull request #20183 from xhawk18:3.4 2021-10-04 16:44:57 +00:00
imgcodecs EXR reading: support Z channel if no Y channel 2021-06-02 15:53:32 +03:00
imgproc Merge pull request #20797 from sturkmen72:restore_LSD 2021-10-02 17:50:38 +00:00
java Automatically set the correct OpenCV version in build.gradle 2021-10-02 16:06:33 +02:00
js Merge pull request #20743 from keroiber:prefix_js_function_bindings_with_namespace 2021-10-04 16:51:49 +00:00
ml fix testSaveLoad 2021-08-11 21:52:39 +09:00
objdetect Merge pull request #20150 from rogday:svm_detector_test 2021-06-01 13:31:12 +00:00
photo Tile: 2021-09-24 21:47:14 +08:00
python pre: OpenCV 3.4.16 (version++) 2021-10-04 20:47:07 +00:00
shape python: discover tests from module/misc/python/test paths 2019-04-10 18:35:35 +00:00
stitching fix loop boundary condition 2021-04-20 22:08:01 -04:00
superres build: eliminate build warnings 2021-08-28 17:11:26 +00:00
ts Merge pull request #20146 from asmorkalov:as/java_test_filter 2021-06-02 17:50:29 +00:00
video Update perf_bgfg_mog2.cpp, perf_bgfg_knn.cpp 2021-09-25 23:06:50 +03:00
videoio Fix gst_initializer 2021-10-02 15:42:13 +00:00
videostab backport: fixed warnings produced by clang-9.0.0 2019-09-23 18:36:18 +03:00
viz Added to Camera constructor parameter description 2020-04-26 00:17:39 -06:00
world
CMakeLists.txt