Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-12-08
01:15 • Closed ticket [3593703fff]: Tcl_PkgRequireEx crash plus 7 other changes artifact: b0ef36a0fa user: dgp
00:42 • Ticket [3593703fff]: 4 changes artifact: ca18a2390a user: dgp
00:33 • Ticket [3593703fff]: 4 changes artifact: 96eaae1b9b user: dgp
00:28 • Ticket [3593703fff]: 4 changes artifact: d46ae4a2e5 user: dgp
2012-12-07
15:14 • New ticket [3593703fff]. artifact: 51ded788bf user: dgp

Tcl_PkgRequireEx crash

Closed / Fixed3593703fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2012-12-07 15:14:43
While working on 3588687, we discovered that

Tcl_PkgRequireEx(interp, "Tcl", "8.5 9", 0, NULL)

leads to a segfault.
dgpplain2012-12-08 00:28:56
RequirementSatisfied() calls
CheckVersionAndConvert() with interp= NULL.

CVAC isn't written to handle that.
dgpplain2012-12-08 00:33:08
if (interp) {...} guard is enough to stop the crash.
dgpplain2012-12-08 00:42:50
spoke too soon.  The comments in RS() make
clear the assumption that CVAC() cannot fail.
Given legal input strings that would be correct.

But crashing on illegal input isn't ideal.
dgpplain2012-12-08 01:15:12
allow_comments - 1

added missing validity check.  fixed for 8.5.14 and 8.6.0.
Log in (anonymous is fine) to add a comment.