[ace-users] regcomp, regexec, regfree Problems on Linux

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Tue Sep 25 10:28:28 CDT 2007


Hi Joe,

   Could you post a small, self-contained example that illustrates the
problem so that people could try this on other versions of UNIX/Linux?

thanks,

        Doug

>I'm using regcomp, regexec, and regfree on Linux (i.e., Linux
>2.6.22.5-76.fc7 #1 SMP Thu Aug 30 13:47:21 EDT 2007 i686 i686 i386
>GNU/Linux) and I've run into memory leak problems. Doug Schmidt thought
>that these problems had been seen before and suggested I post to this
>group.
>
>I originally just called regcomp once, regexec as many times as needed,
>and then regfree once. However, valgrind tells me there are memory
>problems. The only way I saw to fix the memory problems was to call
>regcomp, regexec, and regfree consecutively (which defeats the purpose
>of having regcomp).
>
>Does anyone have any information on the problem I'm seeing?
>
>Thanks for your help.
>
>-Joe
>


-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list