ippiFilterScharrVertBorder_32f_C1R segmentation fault

ippiFilterScharrVertBorder_32f_C1R segmentation fault

Sample code:



#include "ipp.h"
int main(int, char *[])


	const IppiBorderType bt = ippBorderConst;
	IppiSize roi;

	roi.width  = 400;

	roi.height = 500;
	std::cout << "in is " << roi.width << "x" << roi.height << std::endl;
	int in_stride = 0;

	Ipp32f *in = ippiMalloc_32f_C1(roi.width,roi.height,&in_stride);

	assert( in != NULL );
	IppStatus status = ippiSet_32f_C1R(0.0f,in,in_stride,roi);

	assert( status == ippStsNoErr );
	std::cout << "in_stride is " << in_stride << " bytes" << std::endl;
	int out_stride = 0;

	Ipp32f *out = ippiMalloc_32f_C1(roi.width,roi.height,&out_stride);

	assert( out != NULL );
	std::cout << "out_stride is " << out_stride << " bytes" << std::endl;
	int v_buffer_size  = 0;

	status = ippiFilterScharrVertGetBufferSize_32f_C1R(


		&v_buffer_size );

	assert( status == ippStsNoErr );
	Ipp8u *buffer = ippsMalloc_8u(v_buffer_size);

	assert(buffer != NULL);
	std::cout << "allocated " << v_buffer_size << " bytes for buffer" << std::endl;
	status = ippiFilterScharrVertBorder_32f_C1R(

		in,  in_stride,

		out, out_stride,




		&buffer[0] );

	assert( status == ippStsNoErr );


	return 0;


The code segmentation faults on the ippiFilterScharrVertBorder_32f_C1R call. Compiled with:

g++ -g -I/opt/intel/ipp/include -o debug-scharr.cpp.o -c debug-scharr.cpp
g++ -g debug-scharr.cpp.o -o debug-scharr \\\\
/opt/intel/composer_xe_2011_sp1.10.319/ipp/lib/intel64/libippcv_l.a \\\\
/opt/intel/composer_xe_2011_sp1.10.319/ipp/lib/intel64/libippi_l.a \\\\
/opt/intel/composer_xe_2011_sp1.10.319/ipp/lib/intel64/libipps_l.a \\\\

uname -a: Linux babbage.local 3.4.6-2.fc17.x86_64 #1 SMP Thu Jul 19 22:54:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
OS: Fedora F17 64-bit
CPU: Intel Core i7-2600 @ 3.4GHz
IPP: intel64

Two important points:

  1. Removing the ippStaticInit call stops it from crashing, this presumably uses the generic CPU code path instead of the optimised one.
  2. The horizontal filter routines work just fine (ippiFilterScharrHorizGetBufferSize_32f_C1R and ippiFilterScharrHorizBorder_32f_C1R).

Pretty sure this is a bug in the IPP.

publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Hi Adam,

Thank youa lot for the report and detialed test case. We will investigate it and let you know if any updates.

Best Regards,

I forgot to mention I'm using the stock GCC for F17, gcc 4.7.0 20120507 (Red Hat 4.7.0-5).

I've also noticed that the Horiz routine also segfaults in our main application, but not in the test case above - I haven't investigated further though.

Hi Adam,

Thanks for the update. I can reproduce the problem in VerticalBorder. The problem have been escalated to our developer team. We will keep you update.

Best Regards,

Hi Adam,

I get notification from our engineer. When they try the code with IPP 7.1 gold, the problem was gone. So they marked the problem is fixed in IPP 7.1.
Would you like to try it and let me know if any problem. You can download IPP 7.1 from

Best Regards,

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya