Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I'm running Ubuntu and trying to develop an application. I ran into something weird today. I need to use regular expressions, but both regcomp() and pcre_compile() crash my application ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    1

    Question Regex Problem (Memory Corruption)

    Hi,

    I'm running Ubuntu and trying to develop an application. I ran into something weird today. I need to use regular expressions, but both regcomp() and pcre_compile() crash my application with the error : "malloc() : memory corruption". Any ideas?
    This is the PCRE version.
    Code:
    int isValidResponse(char *response) {
        pcre *regex;
        const char* err;
        int errOffset;
        int ovsize[30];
        
        regex = pcre_compile("hello[0-9]?", 0, &err, &errOffset, NULL);
        ...
    Thanks,
    -Tudor

  2. #2
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211
    Hi, I do not know if you have read this but as the problem could have many different causes I thought it best to send you the link, so you can read yourself.

    hope it helps

    C/C++ Memory Corruption And Memory Leaks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...