Issue 4416: state_reset not called on 'state' before sre_search invoked (original) (raw)

Created on 2008-11-25 01:11 by CWRU_Researcher1, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg76377 - (view) Author: Brian Szuter (CWRU_Researcher1) Date: 2008-11-25 01:11
/home/rxc92/project/Python-2.5.2/Modules/_sre.c (pattern_search) Line 2740 Elsewhere in the codebase, state_reset is called on the first parameter of sre_search before sre_search is invoked. The does not occur here.
msg77508 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-12-10 08:49
Can you provide a test case demonstrating a problem?
msg77580 - (view) Author: Brian Szuter (CWRU_Researcher1) Date: 2008-12-11 00:50
Examples: /Python-2.5.2/Modules/_sre.c Lines 3289 - 3297 (scanner_search) /Python-2.5.2/Modules/_sre.c Lines 2349 - 2357 (pattern_subx) /Python-2.5.2/Modules/_sre.c Lines 2197 - 2205 (pattern_split) /Python-2.5.2/Modules/_sre.c Lines 2067 - 2075 (pattern_findall)
msg77581 - (view) Author: Brian Szuter (CWRU_Researcher1) Date: 2008-12-11 00:53
This bug was found using a research tool that finds potential neglected condition bugs by examining a code base, deducing rules from the code base, and finding violations of those rules. I have not attempted to demonstrate a problem visible to users from this bug, and so cannot provide a test case demonstrating a problem.
msg77599 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-11 09:03
There is no issue: in pattern_search, state_init is called before sre_search is invoked. And state_init contains all the operations performed by state_reset. The invariant here is that each call to sre_search must be preceded by a call to state_reset *or* state_init. I don't know whether your tool can detect this.
History
Date User Action Args
2022-04-11 14:56:41 admin set github: 48666
2008-12-11 09:03:33 amaury.forgeotdarc set status: open -> closedresolution: not a bugmessages: + nosy: + amaury.forgeotdarc
2008-12-11 00:53:31 CWRU_Researcher1 set messages: +
2008-12-11 00:50:52 CWRU_Researcher1 set versions: + Python 2.7, - Python 2.5.3
2008-12-11 00:50:35 CWRU_Researcher1 set messages: + versions: + Python 2.5.3, - Python 2.7
2008-12-10 08:49:46 loewis set nosy: + loewismessages: + versions: + Python 2.7, - Python 2.5.3
2008-11-25 01:11:05 CWRU_Researcher1 create