- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using the ippsFIRMRInitAlloc function in my code and some values of upFactor and downFacto causes the function to crash such as when upFactor is 23999 and downFactor is 24000. Is there some limit to the values that can be used or how can I check inputs are safe?
I am running windows 7 64bit OS on a Core 2 Quad and i7 system, have tried linking against IPP 6.1.0.032 and7.0.6.278.
below is the simplified portion of code that throws the exception:
Ipp64f* taps = ippsMalloc_64f(1);
IppsFIRState_64f* pState;
Ipp64f* pDlyLine = NULL;
int p = 23999;
int q = 24000;
ippsFIRMRInitAlloc_64f(&pState,taps,1,p,0,q,0,pDlyLine);
I have other values of p and q such as p = 2399, q = 2400 works fine.
Would appreciate any help,
Thanks
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem was reproduced.
Actuallyinteger overflow happensduring calculation internal table.In the next release of IPP function will return error state in suchsituation.
Actuallyinteger overflow happensduring calculation internal table.In the next release of IPP function will return error state in suchsituation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks for the reply. in the mean time, would it be possible to provide some idea of what is the range of values that will work so that I can add some code to check the inputs and before the function call to ensure it does not crash my entire program? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To work correct the input parameter should satisfy condition
(4 * (Ipp64s)numTaps * downFactor + downPhase) < IPP_MAX_32S
The nearest fixin next IPPrelease will check this condition and return error state.
Thanks.
(4 * (Ipp64s)numTaps * downFactor + downPhase) < IPP_MAX_32S
The nearest fixin next IPPrelease will check this condition and return error state.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Andrey Bakshaev (Intel)
To work correct the input parameter should satisfy condition
(4 * (Ipp64s)numTaps * downFactor + downPhase) < IPP_MAX_32S
The nearest fixin next IPPrelease will check this condition and return error state.
(4 * (Ipp64s)numTaps * downFactor + downPhase) < IPP_MAX_32S
The nearest fixin next IPPrelease will check this condition and return error state.
It would be nice to have that condition in a header file. Now it is clear whyan error happened:
( 4 * 1 * 23999 * 24000 )= 2,303,904,000 > 2,147,483,647
[Updated by SergeyK] Something is wrong with the condition...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Andrey Bakshaev (Intel)
To work correct the input parameter should satisfy condition
(4 * (Ipp64s)numTaps * downFactor + downPhase) < IPP_MAX_32S
...
(4 * (Ipp64s)numTaps * downFactor + downPhase) < IPP_MAX_32S
...
Andrey,
Could you verify the condition, please? I just noticed that something iswrong. A couple ofmore things:
1. The function 'ippsFIRMRInitAlloc_64f' has7 input argumentsand 1 output argument ( pfState ).
...
st = ::ippsFIRMRInitAlloc_64f( &pfState, pfTaps, iTapsLen, iUpFactor, iUpPhase, iDownFactor, iDownPhase, pfDelayLine );
...
I underlined input arguments with numerical values and I thinkthey have to be taken into accountin
case of verifications.
2. The problem is reproducible with IPP libraries down to version 3.x.
Best regards,
Sergey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page