Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Missing error checks/reports in regexp compilation

Closed / Accepted818a1a51e43c125b06d92db6dd3505255044cb36Created 11 years agoUpdated 11 years ago
Descriptionplain2015-08-12 05:03:35
You guys probably should absorb the fixes we (Postgres) made to Spencer's regexp library here:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=8a0258c31808c514755e3bba03cb052084c4887c

These oversights reportedly have been seen to cause null-pointer-dereference crashes under low-memory testing.  I haven't personally duplicated a crash, but it sure looks broken to me.
Referenced by2
  • ad6840ded7[818a1a51e4] Apply fixes from Andreas Seltenreich (reported to us by Tom Lane) for handling low memory situations. Should not be reachable in Tcl due to ckalloc() panic policy. check-in2015-08-17 18:23:20
  • c5a6ed1cd5[818a1a51e4] Apply fixes from Andreas Seltenreich (reported to us by Tom Lane) for handling low memory situations. Should not be reachable in Tcl due to ckalloc() panic policy. check-in2015-08-17 18:22:18
dkf Ticket [818a1a51e4]: 4 changes [History diff]2015-08-17 18:06:49
dkfhtml2015-08-17 18:10:18

It's less serious for us, as we usually use a malloc() replacement that does an abort() when we run out of memory. But that doesn't mean we shouldn't take those fixes.

dkfhtml2015-08-17 18:26:29

Thanks to both you and Andreas Seltenreich. The patch is now applied to the 8.5 and 8.6 branches (modulo some minor syntactic changes because our version of the RE code follows Tcl code formatting rules).

Log in (anonymous is fine) to add a comment.