imwrite jpg segfault - caused by overoptimized jpeglib (Bug #519)


Added by Stefan Hahn over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:build/install
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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

Revision 5f15cf64
Added by Vadim Pisarevsky over 14 years ago

in the case of GCC always build jcdctmgr.c with "-O1" (ticket #519)

Revision ff0d23e5
Added by Andrey Kamaev about 12 years ago

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

Also available in: Atom PDF