octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38616] memory leak in regexprep


From: anonymous
Subject: [Octave-bug-tracker] [bug #38616] memory leak in regexprep
Date: Thu, 28 Mar 2013 08:17:38 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)

URL:
  <http://savannah.gnu.org/bugs/?38616>

                 Summary: memory leak in regexprep
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Do 28 Mär 2013 08:17:36 UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: ce
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The following code produces an out of memory / memory exhausted error on
octave 3.7.2+(VS), 3.6.2(VS, MinGW), 3.4.3 (MinGW) and 3.2.4 (MinGW) as well
as on octave-3.6.4 under Linux:

#**************************************
s="0123456789";
for i=1:21, s=cstrcat(s,s);,endfor
 
s = regexprep(s,'0','2'); 
s = regexprep(s,'1','2'); 
s = regexprep(s,'2','3'); 
#**************************************

Also the following (it seems to be something persistent):
**********
s="0123456789";
for i=1:21, s=cstrcat(s,s);,endfor
save "TestData.dat" s

*****************************
fid = fopen("TestData.dat","r");
s = fscanf(fid,'%c');
warning: range error for conversion to character value
fclose(fid);
s = regexprep(s,'0','2');
clear all
fid = fopen("TestData.dat","r");
s = fscanf(fid,'%c');
******************************

results in (octave-3.6.2 VS and 3.6.2 MinGW [win 7 64 bit Home premium, 4GB
memory]) 
error: memory exhausted or requested size too large for range of Octave's
index type -- trying to return to prompt
and (octave 3.7.2+ VS) [win 7 64 bit Home premium, 4GB memory] and [Win XP,
4GB]
error: out of memory or dimension too large for Octave's 
index type
but succeds in Octave-3.6.2 Cygwin, -3.2.4 MinGW and -3.4.3 MinGW







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38616>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]