Ticket UUID: | 1832612 | |||
Title: | fixempties() can traverse free list | |||
Type: | Bug | Version: | obsolete: 8.4.16 | |
Submitter: | dgp | Created on: | 2007-11-15 17:00:35 | |
Subsystem: | 43. Regexp | Assigned To: | dgp | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2007-11-16 05:03:44 | |
Resolution: | Fixed | Closed By: | dgp | |
Closed on: | 2007-11-15 22:03:44 | |||
Description: |
Attached is patch to fix a buggy loop in the fixempties() routine. The loop traverses linked lists, and the core of the loop can remove an item from the list. The loop properly handles the case where the current item is removed by figuring out where to go next before the item pointing the way might get removed. However, it doesn't handle the case where the state where we're going next gets removed. In that case, the loop follows that deleted state, and ends up walking the freelist of discarded states. Those discarded states are trivial data-less states, so there's no harm, but we might be spending significant effort walking dead states. | |||
User Comments: |
dgp added on 2007-11-16 05:03:43:
Logged In: YES user_id=80530 Originator: YES fixed for 8.4.17 too. dgp added on 2007-11-16 00:03:34: File Added - 254457: fixempties.patch Logged In: YES user_id=80530 Originator: YES Here's that patch for the HEAD, which I'm committing now. Will commit same fix for 8.4.17, but holding that back since I've got more regexp debugging underway in my 8.4 sandbox at the moment. File Added: fixempties.patch |
Attachments:
- fixempties.patch [download] added by dgp on 2007-11-16 00:03:34. [details]