imwrite jpg segfault - caused by overoptimized jpeglib (Bug #519)
Description
imwrite throws a segfault exception when writing a jpg image.
Problem found and solved -
however, I propose to take care of it in further releases.
I am using opencv 2.1 with Qt 4.6.0 and the QTcreator IDE on WVista.
I completely recompiled opencv for MinGW32.
Depending on
- how much (unrelated) prior actions are done in the application,
- how imwrite is invoked and
- on which machine the application is started,
the segfault does occur or not occur.
The problem is reproducible.
The problem turned out to be a MOVDQA instruction optimized into the code from jcdctmgr.c not taking care whether a parameter is 16byte-aligned or not.
The problem could be solved by compiling jcdctmgr with -O1
Associated revisions
in the case of GCC always build jcdctmgr.c with "-O1" (ticket #519)
Merge pull request #519 from bitwangyaoyao:2.4_findOCL
History
Updated by Stefan Hahn over 14 years ago
Forgot important info: gcc 4.4.0 used
Updated by Vadim Pisarevsky over 14 years ago
thanks! fixed in r3969
- Status changed from Open to Done
- (deleted custom field) set to fixed