Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2015-09-21
18:52 • Closed ticket [a3c3508599]: backwards test in newcolor() plus 7 other change... artifact: c31b9e6ade user: dgp
18:50
[d7ea9f985][a3c3508599] Internal regexp fixes that cleanup and streamline. check-in: 7e49ffdb09 user: dgp tags: trunk
18:22
[d7ea9f985][a3c3508599] Internal regexp fixes that cleanup and streamline. check-in: 135d445620 user: dgp tags: core-8-5-branch
17:29 • Ticket [a3c3508599] backwards test in newcolor() status still Open with 3 ot... artifact: d79856ab7f user: dgp
17:29
[a3c3508599] Fix typo that reversed test sense in prior fix for [3610026]. closed check-in: 3a17aa1449 user: dgp tags: tgl-pg-re
2015-09-16
17:22 • New ticket [a3c3508599] backwards test in newcolor(). artifact: 65d058459f user: tgl

backwards test in newcolor()

Closed / Fixeda3c3508599b32dfda5e83698aa9e301273b5f7cfCreated 11 years agoUpdated 11 years ago
Descriptionplain2015-09-16 17:22:03
I was just going through deltas between Tcl's regexp code and Postgres' version of the code, and I found what appears to be a typo in your version of the fix for the color-overflow problem.  In newcolor(), regc_color.c line 262 in 8.6.4, you have:

	if (n < MAX_COLOR + 1) {
	    n = MAX_COLOR + 1;
	}

We have that test as "if (n > MAX_COLOR + 1)" which I think is correct: the point is to limit the value of n to MAX_COLOR+1, not to force it up to that instantly.

The effect of this is just some inefficiency, ie colormaps will bloat to 32K entries as soon as they exceed NINLINECDS, but still it's a bug.
Referenced by3
dgpplain2015-09-21 17:29:49
Fixed on tgl-pg-re branch.
dgpplain2015-09-21 18:52:58
Fixed for 8.5.19 and 8.6.5
Log in (anonymous is fine) to add a comment.