<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/regexkit/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/regexkit/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/regexkit/bugs/</id><updated>2016-02-23T12:03:58.114000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>rkl_RegisterForLowMemoryNotifications crash</title><link href="https://sourceforge.net/p/regexkit/bugs/69/" rel="alternate"/><published>2016-02-23T12:03:58.114000Z</published><updated>2016-02-23T12:03:58.114000Z</updated><author><name>Leo Gomez</name><uri>https://sourceforge.net/u/arkyvc/</uri></author><id>https://sourceforge.net34ffde19eb4df97f5da0017ded15be88abed512d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have got a few crashes (happening in about 40 devies or so, all running iOS8) coming from Apple which look like are associated with the library when registering for low memory notifications.&lt;/p&gt;
&lt;p&gt;It only happens in iOS8, though.&lt;/p&gt;
&lt;p&gt;Please find the report attached.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Nondeterministic behavior when matching empty strings</title><link href="https://sourceforge.net/p/regexkit/bugs/68/" rel="alternate"/><published>2014-06-06T22:05:40.201000Z</published><updated>2014-06-06T22:05:40.201000Z</updated><author><name>David</name><uri>https://sourceforge.net/u/avaloneon/</uri></author><id>https://sourceforge.net3c82130fe031e42ebe292e97f31e2a7557f12103</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When a regex matches an empty string, it returns "NO" every other call, even if the regex matches.&lt;/p&gt;
&lt;p&gt;For example, "foo" in the following example will always be "NO", since "&lt;span&gt;[emptyString isMatchedByRegex:regex]&lt;/span&gt;" will alternate return values on every call.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;NSString&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;emptyString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;@&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;NSString&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;regex&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;@&amp;quot;^$&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;BOOL&lt;/span&gt; &lt;span class="n"&gt;foo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;emptyString&lt;/span&gt; &lt;span class="n"&gt;isMatchedByRegex&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;regex&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;emptyString&lt;/span&gt; &lt;span class="n"&gt;isMatchedByRegex&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;regex&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This only works when the regexes are identical, however. For instance:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kt"&gt;BOOL&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;emptyString&lt;/span&gt; &lt;span class="n"&gt;isMatchedByRegex&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s"&gt;@&amp;quot;^$&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;emptyString&lt;/span&gt; &lt;span class="n"&gt;isMatchedByRegex&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s"&gt;@&amp;quot;^.*$&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;will normally be true, as both statements are likely to be in sync.&lt;/p&gt;
&lt;p&gt;Since this technique is used in the "Parsing CSV Data" example, either the documentation or RegexKitLite is in need of an update.&lt;/p&gt;
&lt;p&gt;OSX 10.9.2, XCode 5.0.2, 10.9 SDK, ARC off.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>XCode 4.5.2 analyzer complains about garbage value</title><link href="https://sourceforge.net/p/regexkit/bugs/67/" rel="alternate"/><published>2013-01-16T16:41:04Z</published><updated>2013-01-16T16:41:04Z</updated><author><name>Jeff</name><uri>https://sourceforge.net/u/jishaq2/</uri></author><id>https://sourceforge.neta11810dac16c3d8f73b34f4674c14f65837e1b7d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When I build RegexKitLite 4.0 in XCode 4.5.2 w iOS SDK 6.0, the static analyzer complains:  \"The right operand of \'+\' is a garbage value\", and the 50-step static analysis sequence to exhibit this issue is pointing to iOS API\'s -NSMaxRange:range method.  The RegexKitLite API that is invoking NSMaxRange is rkl_findRanges.&lt;/p&gt;
&lt;p&gt;I\'m not sure if this is a false negative.  I turned off static analysis of this file to ignore the warning, using the tip here:  &lt;a href="http://stackoverflow.com/a/8087544/260559" rel="nofollow"&gt;http://stackoverflow.com/a/8087544/260559&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am attaching a screenshot of the issue, showing the the 50-step (!!) static analysis sequence that clang thinks causes the problem.&lt;br /&gt;
&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>rkl_handleDelayedAssert </title><link href="https://sourceforge.net/p/regexkit/bugs/66/" rel="alternate"/><published>2012-06-05T03:33:53Z</published><updated>2012-06-05T03:33:53Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.neta105aba203bf888b1d67fa7c92d944773b245864</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Making all for tweak txtwService...&lt;br /&gt;
Compiling Regex/RegexKitLite.m...&lt;br /&gt;
cc1obj: warnings being treated as errors&lt;/p&gt;
&lt;p&gt;Regex/RegexKitLite.m: In function ‘rkl_handleDelayedAssert’:&lt;br /&gt;
Regex/RegexKitLite.m:1199: warning: format not a string literal and no format arguments&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MaxOSX Build Errors</title><link href="https://sourceforge.net/p/regexkit/bugs/65/" rel="alternate"/><published>2012-05-17T07:13:53Z</published><updated>2012-05-17T07:13:53Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net6693228b17cfd7d21767fb197276201a063e9513</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am receiving the following errors when trying to compile on Mac OSX 10.7.3, Xcode 4.3.2 using Apple LLVM Compiler 3.1:&lt;/p&gt;
&lt;p&gt;'captureCount' was not declared in this scope&lt;/p&gt;
&lt;p&gt;This error is happening on line 259 of the RegexKitLite.h file around this line of code:&lt;br /&gt;
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;&lt;/p&gt;
&lt;p&gt;Any ideas on how I can get around this error? &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ARC</title><link href="https://sourceforge.net/p/regexkit/bugs/64/" rel="alternate"/><published>2012-03-22T02:31:38Z</published><updated>2012-03-22T02:31:38Z</updated><author><name/><uri>https://sourceforge.net</uri></author><id>https://sourceforge.net424810268567b5d7be37f5e5054c875deae3408b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Please use ARC (Automatic Reference Counting).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Crash in rkl_getCachedRegexSetToString</title><link href="https://sourceforge.net/p/regexkit/bugs/63/" rel="alternate"/><published>2011-12-04T17:45:38Z</published><updated>2011-12-04T17:45:38Z</updated><author><name>jason mazzotta</name><uri>https://sourceforge.net/u/jasonmaz/</uri></author><id>https://sourceforge.net9abdbc054a104bf8f50016ff60eba13016668e6c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br /&gt;
I've been trying to use RegexKitLite to do some screen scraping for an iPhone app.  I've been trying to make sure memory is&lt;br /&gt;
being reclaimed properly at this point in m app development.  Unfortunately, my app now crashes in a very reproducible way &lt;br /&gt;
with the following stack trace:&lt;/p&gt;
&lt;p&gt;Full Plate[1117:13c13] *** -[CFString release]: message sent to deallocated instance 0x7bee0a80&lt;/p&gt;
&lt;p&gt;#0  0x018ace1e in ___forwarding___ ()&lt;br /&gt;
#1  0x018acce2 in __forwarding_prep_0___ ()&lt;br /&gt;
#2  0x01852435 in CFRelease ()&lt;br /&gt;
#3  0x000fbbee in rkl_clearCachedRegexSetTo (cachedRegex=0x1375cc) at /Volumes/STORAGE/Documents/FullPlate/Classes/Sources/RegexKitLite.m:1696&lt;br /&gt;
#4  0x00103978 in rkl_getCachedRegexSetToString (regexString=0x132b0c, options=32, matchString=0x7e8128f0, matchLengthPtr=0xb010269c, matchRange=0xb0102820, error=0xb0102b60, exception=0xb01026a8, status=0xb01026a4) at /Volumes/STORAGE/Documents/FullPlate/Classes/Sources/RegexKitLite.m:1002&lt;br /&gt;
#5  0x000f9d92 in rkl_performRegexOp (self=0x7e8128f0, _cmd=0x12061a, regexOp=37, regexString=0x132b0c, options=32, capture=0, matchString=0x7e8128f0, matchRange=0xb0102820, replacementString=0x0, error=0xb0102b60, result=0x0, captureKeysCount=0, captureKeys=0x0, captureKeyIndexes=0x0) at /Volumes/STORAGE/Documents/FullPlate/Classes/Sources/RegexKitLite.m:1119&lt;br /&gt;
#6  0x000fcfd2 in -[NSString(RegexKitLiteAdditions) arrayOfCaptureComponentsMatchedByRegex:options:range:error:] (self=0x7e8128f0, _cmd=0x12061a, regex=0x132b0c, options=32, range={location = 0, length = 193038}, error=0xb0102b60) at /Volumes/STORAGE/Documents/FullPlate/Classes/Sources/RegexKitLite.m:2437&lt;br /&gt;
#7  0x000e563a in -[AllRecipesManager loadRecipe:withReferer:] (self=0x7bec08b0, _cmd=0x120446, url=0x7cadcb70, referer=0x7cc99ef0) at /Volumes/STORAGE/Documents/FullPlate/Classes/Sources/AllRecipesManager.m:648&lt;br /&gt;
#8  0x000e30f4 in -[AllRecipesManager generateRecipes:] (self=0x7bec08b0, _cmd=0x12085e, menuViewController=0x7cc3d100) at /Volumes/STORAGE/Documents/FullPlate/Classes/Sources/AllRecipesManager.m:248&lt;br /&gt;
#9  0x003bd4e6 in -[NSThread main] ()&lt;br /&gt;
#10 0x003bd457 in __NSThread__main__ ()&lt;br /&gt;
#11 0x93f4bed9 in _pthread_start ()&lt;br /&gt;
#12 0x93f4f6de in thread_start ()&lt;/p&gt;
&lt;p&gt;When I look at the method at the top of the stack, the list of local variables says that cachedRegex-&amp;gt;setToString is a freed object.  This code is being executed in a thread.  The first time I run this thread, I don't see this problem.  The second time I run this thread, I invariably get this crash.  Strangely, I call&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;arrayOfCaptureComponentsMatchedByRegex: options: range: error:&lt;/p&gt;
&lt;p&gt;twice during the thread code before this crash occurs.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Memory Leak under Garbage Collection</title><link href="https://sourceforge.net/p/regexkit/bugs/62/" rel="alternate"/><published>2011-05-17T09:51:44Z</published><updated>2011-05-17T09:51:44Z</updated><author><name>Frank Reiff</name><uri>https://sourceforge.net/u/frankreiff/</uri></author><id>https://sourceforge.net6f45a5f84b9c55958fff1974977a7052cb15148b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;First off: Thanks for making this framework available to other developers.&lt;/p&gt;
&lt;p&gt;I'm using RegExKitLite in a 64-bit garbage collected environment and the Analyzer of XCode 4.0 finds several "Dead store" and "Core Foundation: Potential leak" in the most current version of the framework.&lt;/p&gt;
&lt;p&gt;I have found the analyzer to be very thorough and to find problems in my own core foundation code, so I'm fairly certain that "potential leak" translates into "real leak". On top of that it looks like my application has a core foundation leak somewhere, but only when regular expressions are used and the only leaks that the analyzer can find is in the RegExKitLite.m file..&lt;/p&gt;
&lt;p&gt;I don't really understand the RegExKitlite code and I'm reluctant to just go and put in CFMakeCollectable statements everywhere, but I think that's probably all that's required.&lt;/p&gt;
&lt;p&gt;I'm using LLVM 2.0/ 64-bit/ 10.6 only, in case it's relevant.&lt;/p&gt;
&lt;p&gt;Thank you for looking into this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Bug in RegexKitPrivateAtomic.h on GNUstep/Ubuntu</title><link href="https://sourceforge.net/p/regexkit/bugs/61/" rel="alternate"/><published>2011-04-27T16:11:22Z</published><updated>2011-04-27T16:11:22Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netd8664724e9ad3c2c37db1947c402c0e2e6b8e81e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Found this little bug trying to get RegexKit to compile with GNUstep on Ubuntu. &lt;/p&gt;
&lt;p&gt;In Source/Headers/RegexKit/RegexKitPrivateAtomic.h at line 167:&lt;br /&gt;
#define RKAtomicCompareAndSwapPtr(oldp, newp, ptr)             __sync_bool_compare_and_swap(ptr, oldValue, newValue)&lt;br /&gt;
should be:&lt;br /&gt;
#define RKAtomicCompareAndSwapPtr(oldValue, newValue, ptr)     __sync_bool_compare_and_swap(ptr, oldValue, newValue)&lt;/p&gt;
&lt;p&gt;Svn diff for patch attached.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Incorrect capture group numbering</title><link href="https://sourceforge.net/p/regexkit/bugs/60/" rel="alternate"/><published>2011-03-19T13:00:35Z</published><updated>2011-03-19T13:00:35Z</updated><author><name>Dov</name><uri>https://sourceforge.net/u/thedov/</uri></author><id>https://sourceforge.net8dd0d323e274ad027f1a2552b7f2afa8fbdb2b0f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;For the regex: @"^\\s*(.+?)(?:\\s+\\#?(\\d+(?:\\.\\d+)?)(?:\\s*(?:\\(?\\s*of|-)\\s*(\\d+)\\s*\\)?)?)?\\s*(?:(\\(.*)\\s*)?$"&lt;br /&gt;
and the input: @"xxx xxxxx - xxxxxxx xx xxx xxxx 01 (xxx) (1111) (xxxxxxxxx - xxxxxx)"&lt;/p&gt;
&lt;p&gt;Called like so:&lt;/p&gt;
&lt;p&gt;NSDictionary *matches = [input dictionaryByMatchingRegex:regex&lt;br /&gt;
options:RKLComments&lt;br /&gt;
range:NSMakeRange(0, [fileName length])&lt;br /&gt;
error:NULL&lt;br /&gt;
withKeysAndCaptures:&lt;br /&gt;
@"a", 1,&lt;br /&gt;
@"b", 2,&lt;br /&gt;
@"c", 3,&lt;br /&gt;
@"d", 4,&lt;br /&gt;
nil];&lt;/p&gt;
&lt;p&gt;I get @"(xxx) (1111) (xxxxxxxxx - xxxxxx)" returned for key @"c", even though it should be the 4th capture group. Other regex parsers function this way, and it makes the dictionaryByMatchingRegex functions much less useful if the capture groups don't retain absolute numbering.&lt;/p&gt;
&lt;p&gt;I'm using RegexKitLite by including the .h and .m files in my project source. I'm in Xcode 4 writing a Mac app targeting the latest versions of the framework (10.6).&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>