|
2015-09-19
| ||
| 17:03 | • Closed ticket [6e273fe743]: Minor memory leaks in regex compilation plus 6 o... artifact: 4049aeaa62 user: tgl | |
|
2014-07-19
| ||
| 22:15 | • Ticket [6e273fe743]: 3 changes artifact: 74efed252e user: ferrieux | |
| 18:05 | • Ticket [6e273fe743]: 3 changes artifact: c9bcadebac user: tgl | |
| 17:29 | • Ticket [6e273fe743]: 3 changes artifact: 01f9f7a6ec user: ferrieux | |
| 15:38 | • Ticket [6e273fe743]: 3 changes artifact: 800b43f1eb user: tgl | |
| 08:40 | • Ticket [6e273fe743]: 4 changes artifact: 4757c1e759 user: ferrieux | |
|
2014-07-18
| ||
| 20:10 | • New ticket [6e273fe743]. artifact: 79f016b444 user: tgl | |
Minor memory leaks in regex compilation
Closed / Out of Date6e273fe74313c244078b38498cedb776263ebcecCreated 12 years agoUpdated 11 years ago
Descriptionplain2014-07-18 20:10:46
A pair of memory-leak conditions were reported to the Postgres project. These are original to Spencer's code so you've got them too, and might want to adopt our patch. Bug report here: http://www.postgresql.org/message-id/flat/[email protected] Patch here: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=1567e659a877d35ab4b85dafff41b2845d50990f
ferrieuxplain2014-07-19 08:40:04
(okay, a leak happening when malloc() fails is not a hair-rising threat, considering what we usually do in thise case... but resyncing with upstream is healthy in general) Of course, the patch does not apply "as is" since our snapshot (or latest refresh) of the package dates back to 2013-03-06. So it seems natural to first identify the closest cousin of our current version. But, poking around in the upstream (postgre's) git history, I cannot find even a distant match (i.e. there are not only whitespace/justify/brace cosmetics). So I guess, Don, that you started from another "upstream" project. Which one ?
tglplain2014-07-19 15:38:15
Hah! No, Tcl is the upstream that Postgres started from. But yeah, that was years ago (2003, Tcl 8.4.1 according to our commit logs) and the regex code has diverged a whole lot since then. I think more of the cosmetic changes happened on your side, actually.
ferrieuxplain2014-07-19 17:29:05
Thanks for the clarification. Could you spot in your git history the commit that is closest to the point where you forked off the Tcl version ? This way we could follow changes on both sides and compute a delta-delta...
tglplain2014-07-19 18:05:14
Well, we adopted Tcl 8.4.1's code at commit 7bcc6d98f, and at various times since then we've integrated non-cosmetic updates from Tcl; the last such commit was 08fd6ff37 which synced with 8.5.11. The reasons why we didn't track your cosmetic changes are explained at df1e965e1:
Note that I didn't make any effort to duplicate a lot of cosmetic changes
that they made to bring their copy into line with their own style
guidelines, such as adding braces around single-line IF bodies. Most of
those we either had done already (such as ANSI-fication of function headers)
or there is no point because pgindent would undo the change anyway.
What I've generally done for the integration updates was to diff the regex files from the older Tcl release to the newer one, and then manually transcribe whatever changes were not just reformatting.
ferrieuxplain2014-07-19 22:15:04
OK, in other words, you used grey-matter diff and patch :) So, if we take the diff from last sync (08fd6ff37/8.5.11) to tip on your side, and adapt it superficially to our 8.5.11 version, that should do it, right ? Please tell me if I handled the blobdiff params properly: http://git.postgresql.org/gitweb/?p=postgresql.git;a=blobdiff;f=src/backend/regex/regcomp.c;hb=HEAD;hpb=08fd6ff37
tglplain2015-09-19 17:03:43
This fix is included in my general sync-with-Postgres patch submitted at http://core.tcl.tk/tcl/tktview?name=187d7f499b
Log in (anonymous is fine) to add a comment.