Topic
1 reply Latest Post - ‏2013-07-24T01:14:46Z by Dongxi Jin
2MDW_sfsdfsf_sdfsdfsdfsfsdf
2 Posts
ACCEPTED ANSWER

Pinned topic memset

‏2013-07-09T21:49:03Z |

Hi, is it to possible to detect memory corruption like this :

int main(int argc, char *argv[])
{
    int x[100];
    memset(x,0,101);
}
 

I have compiled this kind of code  and run on Purify but doesnt show any array overrun.

 

 

 

Updated on 2013-07-09T21:49:58Z at 2013-07-09T21:49:58Z by 2MDW_sfsdfsf_sdfsdfsdfsfsdf
  • Dongxi Jin
    Dongxi Jin
    6 Posts
    ACCEPTED ANSWER

    Re: memset

    ‏2013-07-24T01:14:46Z  in response to 2MDW_sfsdfsf_sdfsdfsdfsfsdf

    Hi,

    The array x[100] in the code will be stored in the stack area when it is running, while Purify only supports detecting Stack Array Bounds Write (SBW) on SPARC system, not others.