Segmentation fault in ippiRotate with "nan" parameter

Segmentation fault in ippiRotate with "nan" parameter

Is it normal for ippiRotate to cause segmentation fault when "nan" is passed as angle?I believe it should return error and not segfault in any case...Here is the code:


void test_ippiRotate_nan_segfault()
    int srcWidth = 100, srcHeight = 100, srcStep;
    Ipp8u *pSrc = ippiMalloc_8u_C1(srcWidth, srcHeight, &srcStep);
    IppiSize srcSize = { srcWidth, srcHeight };
    IppiRect srcRoi = { 0, 0, srcWidth, srcHeight };

    int dstWidth = 100, dstHeight = 100, dstStep;
    Ipp8u *pDst = ippiMalloc_8u_C1(dstWidth, dstHeight, &dstStep);
    IppiRect dstRoi = { 0, 0, dstWidth, dstHeight };

    double a = std::numeric_limits<double>::quiet_NaN();
    double sx = 0, sy = 0;

    printf("call: ippiRotate_8u_C1R(... , %f %f %f) ...\\n", a, sx, sy);
    ippiRotate_8u_C1R(pSrc, srcSize, srcStep, srcRoi, pDst, dstStep, dstRoi, a, sx, sy, IPPI_INTER_LINEAR);
    printf("done: ippiRotate_8u_C1R() ...\\n");


output:call: ippiRotate_8u_C1R(... , nan 0.000000 0.000000) ...Segmentation fault (core dumped)backtrace:Program terminated with signal 11, Segmentation fault.#0 0x00007fa823d52d86 in y8_ownpi_WarpAffine_L_8u_C1 () from /opt/intel/composerxe/ipp/lib/intel64/ 0x00007fa82393862e in y8_ownpi_WarpAffine () from /opt/intel/composerxe/ipp/lib/intel64/ 0x00007fa8235371ef in y8_ownpi_Rotate () from /opt/intel/composerxe/ipp/lib/intel64/ 0x00007fa82346d1ea in y8_ippiRotate_8u_C1R () from /opt/intel/composerxe/ipp/lib/intel64/

3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione


In order to have secure behavior a check on NaN and +-INF will be added to the next version of IPP (7.1 Gold). The implementation is currently underway.


What is planned for functions for which params are arrays or masks of doubles (for example ippiRemap() crashes in the same way if there is NaN in the map)?Do we have to check for Nan/Inf before each IPP call with floating point params in order to prevent segmentation faults?Thanks!

Accedere per lasciare un commento.