[Rawstudio-dev] Syntax error leading to uninitialized variable in denoise plugin
Dale Olds
dolds at novell.com
Thu Sep 24 19:23:04 CEST 2009
The previous message should have read "The fftwindow.cpp file contains the following code."
>>>
From:
"Dale Olds" <dolds at novell.com>
To:
<rawstudio-dev at rawstudio.org>
Date:
9/24/2009 11:05 AM
Subject:
[Rawstudio-dev] Syntax error leading to uninitialized variable in denoise plugin
A few weeks ago, I had some trouble with segfaults using rawstudio from trunk. When I disabled the asm i386 optimizations, things got much better, but I eventually reverted to an older packaged build from OpenSUSE. Things are looking really good though, so I am looking forward to the next release.
While researching the segfault, I noticed something I believe would cause an intermittent use of some of the asm optimizations. The modules contains the following code:
FFTWindow::FFTWindow( int _w, int _h ) :
analysis(FloatImagePlane(_w, _h)),
synthesis(FloatImagePlane(_w,_h))
{
analysisIsFlat = true;
synthesisIsFlat = true;
analysis.allocateImage();
synthesis.allocateImage();
#if defined (__i386__) || defined (__x86_64__)
SSEAvailable == !!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE);
#endif
}
The problem is this line:
SSEAvailable == !!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE);
As I read it, this means that SSEAvailable is not actually assigned any value here, and is left uninitialized (at least by this code). Shouldn't this line be as follows?
SSEAvailable = !!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE);
--Dale
_______________________________________________
Rawstudio-dev mailing list
Rawstudio-dev at rawstudio.org
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rawstudio.org/pipermail/rawstudio-dev/attachments/20090924/3f7dc20c/attachment.htm
More information about the Rawstudio-dev
mailing list