From 07ee24f589ea3b7d220a8fa59fc23481062a2c12 Mon Sep 17 00:00:00 2001 From: venkat Date: Wed, 12 Aug 2015 05:06:26 +0000 Subject: Upgrade to tzdata2015f from IETF. --- library/tzdata/America/Montevideo | 169 ---------------- library/tzdata/Asia/Pyongyang | 1 + library/tzdata/Atlantic/Canary | 1 - library/tzdata/Europe/Chisinau | 412 +++++++++++++++++++------------------- library/tzdata/Europe/Simferopol | 1 - library/tzdata/Europe/Sofia | 1 - library/tzdata/Europe/Tallinn | 3 +- 7 files changed, 208 insertions(+), 380 deletions(-) diff --git a/library/tzdata/America/Montevideo b/library/tzdata/America/Montevideo index aa469b9..91a5117 100644 --- a/library/tzdata/America/Montevideo +++ b/library/tzdata/America/Montevideo @@ -89,173 +89,4 @@ set TZData(:America/Montevideo) { {1394337600 -10800 0 UYT} {1412485200 -7200 1 UYST} {1425787200 -10800 0 UYT} - {1443934800 -7200 1 UYST} - {1457841600 -10800 0 UYT} - {1475384400 -7200 1 UYST} - {1489291200 -10800 0 UYT} - {1506834000 -7200 1 UYST} - {1520740800 -10800 0 UYT} - {1538888400 -7200 1 UYST} - {1552190400 -10800 0 UYT} - {1570338000 -7200 1 UYST} - {1583640000 -10800 0 UYT} - {1601787600 -7200 1 UYST} - {1615694400 -10800 0 UYT} - {1633237200 -7200 1 UYST} - {1647144000 -10800 0 UYT} - {1664686800 -7200 1 UYST} - {1678593600 -10800 0 UYT} - {1696136400 -7200 1 UYST} - {1710043200 -10800 0 UYT} - {1728190800 -7200 1 UYST} - {1741492800 -10800 0 UYT} - {1759640400 -7200 1 UYST} - {1772942400 -10800 0 UYT} - {1791090000 -7200 1 UYST} - {1804996800 -10800 0 UYT} - {1822539600 -7200 1 UYST} - {1836446400 -10800 0 UYT} - {1853989200 -7200 1 UYST} - {1867896000 -10800 0 UYT} - {1886043600 -7200 1 UYST} - {1899345600 -10800 0 UYT} - {1917493200 -7200 1 UYST} - {1930795200 -10800 0 UYT} - {1948942800 -7200 1 UYST} - {1962849600 -10800 0 UYT} - {1980392400 -7200 1 UYST} - {1994299200 -10800 0 UYT} - {2011842000 -7200 1 UYST} - {2025748800 -10800 0 UYT} - {2043291600 -7200 1 UYST} - {2057198400 -10800 0 UYT} - {2075346000 -7200 1 UYST} - {2088648000 -10800 0 UYT} - {2106795600 -7200 1 UYST} - {2120097600 -10800 0 UYT} - {2138245200 -7200 1 UYST} - {2152152000 -10800 0 UYT} - {2169694800 -7200 1 UYST} - {2183601600 -10800 0 UYT} - {2201144400 -7200 1 UYST} - {2215051200 -10800 0 UYT} - {2233198800 -7200 1 UYST} - {2246500800 -10800 0 UYT} - {2264648400 -7200 1 UYST} - {2277950400 -10800 0 UYT} - {2296098000 -7200 1 UYST} - {2309400000 -10800 0 UYT} - {2327547600 -7200 1 UYST} - {2341454400 -10800 0 UYT} - {2358997200 -7200 1 UYST} - {2372904000 -10800 0 UYT} - {2390446800 -7200 1 UYST} - {2404353600 -10800 0 UYT} - {2422501200 -7200 1 UYST} - {2435803200 -10800 0 UYT} - {2453950800 -7200 1 UYST} - {2467252800 -10800 0 UYT} - {2485400400 -7200 1 UYST} - {2499307200 -10800 0 UYT} - {2516850000 -7200 1 UYST} - {2530756800 -10800 0 UYT} - {2548299600 -7200 1 UYST} - {2562206400 -10800 0 UYT} - {2579749200 -7200 1 UYST} - {2593656000 -10800 0 UYT} - {2611803600 -7200 1 UYST} - {2625105600 -10800 0 UYT} - {2643253200 -7200 1 UYST} - {2656555200 -10800 0 UYT} - {2674702800 -7200 1 UYST} - {2688609600 -10800 0 UYT} - {2706152400 -7200 1 UYST} - {2720059200 -10800 0 UYT} - {2737602000 -7200 1 UYST} - {2751508800 -10800 0 UYT} - {2769656400 -7200 1 UYST} - {2782958400 -10800 0 UYT} - {2801106000 -7200 1 UYST} - {2814408000 -10800 0 UYT} - {2832555600 -7200 1 UYST} - {2846462400 -10800 0 UYT} - {2864005200 -7200 1 UYST} - {2877912000 -10800 0 UYT} - {2895454800 -7200 1 UYST} - {2909361600 -10800 0 UYT} - {2926904400 -7200 1 UYST} - {2940811200 -10800 0 UYT} - {2958958800 -7200 1 UYST} - {2972260800 -10800 0 UYT} - {2990408400 -7200 1 UYST} - {3003710400 -10800 0 UYT} - {3021858000 -7200 1 UYST} - {3035764800 -10800 0 UYT} - {3053307600 -7200 1 UYST} - {3067214400 -10800 0 UYT} - {3084757200 -7200 1 UYST} - {3098664000 -10800 0 UYT} - {3116811600 -7200 1 UYST} - {3130113600 -10800 0 UYT} - {3148261200 -7200 1 UYST} - {3161563200 -10800 0 UYT} - {3179710800 -7200 1 UYST} - {3193012800 -10800 0 UYT} - {3211160400 -7200 1 UYST} - {3225067200 -10800 0 UYT} - {3242610000 -7200 1 UYST} - {3256516800 -10800 0 UYT} - {3274059600 -7200 1 UYST} - {3287966400 -10800 0 UYT} - {3306114000 -7200 1 UYST} - {3319416000 -10800 0 UYT} - {3337563600 -7200 1 UYST} - {3350865600 -10800 0 UYT} - {3369013200 -7200 1 UYST} - {3382920000 -10800 0 UYT} - {3400462800 -7200 1 UYST} - {3414369600 -10800 0 UYT} - {3431912400 -7200 1 UYST} - {3445819200 -10800 0 UYT} - {3463362000 -7200 1 UYST} - {3477268800 -10800 0 UYT} - {3495416400 -7200 1 UYST} - {3508718400 -10800 0 UYT} - {3526866000 -7200 1 UYST} - {3540168000 -10800 0 UYT} - {3558315600 -7200 1 UYST} - {3572222400 -10800 0 UYT} - {3589765200 -7200 1 UYST} - {3603672000 -10800 0 UYT} - {3621214800 -7200 1 UYST} - {3635121600 -10800 0 UYT} - {3653269200 -7200 1 UYST} - {3666571200 -10800 0 UYT} - {3684718800 -7200 1 UYST} - {3698020800 -10800 0 UYT} - {3716168400 -7200 1 UYST} - {3730075200 -10800 0 UYT} - {3747618000 -7200 1 UYST} - {3761524800 -10800 0 UYT} - {3779067600 -7200 1 UYST} - {3792974400 -10800 0 UYT} - {3810517200 -7200 1 UYST} - {3824424000 -10800 0 UYT} - {3842571600 -7200 1 UYST} - {3855873600 -10800 0 UYT} - {3874021200 -7200 1 UYST} - {3887323200 -10800 0 UYT} - {3905470800 -7200 1 UYST} - {3919377600 -10800 0 UYT} - {3936920400 -7200 1 UYST} - {3950827200 -10800 0 UYT} - {3968370000 -7200 1 UYST} - {3982276800 -10800 0 UYT} - {4000424400 -7200 1 UYST} - {4013726400 -10800 0 UYT} - {4031874000 -7200 1 UYST} - {4045176000 -10800 0 UYT} - {4063323600 -7200 1 UYST} - {4076625600 -10800 0 UYT} - {4094773200 -7200 1 UYST} } diff --git a/library/tzdata/Asia/Pyongyang b/library/tzdata/Asia/Pyongyang index fafed54..4ade8e6 100644 --- a/library/tzdata/Asia/Pyongyang +++ b/library/tzdata/Asia/Pyongyang @@ -6,4 +6,5 @@ set TZData(:Asia/Pyongyang) { {-1830414600 32400 0 JCST} {-1017824400 32400 0 JST} {-768646800 32400 0 KST} + {1439564400 30600 0 KST} } diff --git a/library/tzdata/Atlantic/Canary b/library/tzdata/Atlantic/Canary index 4b802c7..dcfba83 100644 --- a/library/tzdata/Atlantic/Canary +++ b/library/tzdata/Atlantic/Canary @@ -5,7 +5,6 @@ set TZData(:Atlantic/Canary) { {-1509663504 -3600 0 CANT} {-733874400 0 0 WET} {323827200 3600 1 WEST} - {338947200 3600 0 WEST} {338950800 0 0 WET} {354675600 3600 1 WEST} {370400400 0 0 WET} diff --git a/library/tzdata/Europe/Chisinau b/library/tzdata/Europe/Chisinau index 4ef466b..5c240e7 100644 --- a/library/tzdata/Europe/Chisinau +++ b/library/tzdata/Europe/Chisinau @@ -63,210 +63,210 @@ set TZData(:Europe/Chisinau) { {828223200 10800 1 EEST} {846363600 7200 0 EET} {852069600 7200 0 EET} - {859683600 10800 1 EEST} - {877827600 7200 0 EET} - {891133200 10800 1 EEST} - {909277200 7200 0 EET} - {922582800 10800 1 EEST} - {941331600 7200 0 EET} - {954032400 10800 1 EEST} - {972781200 7200 0 EET} - {985482000 10800 1 EEST} - {1004230800 7200 0 EET} - {1017536400 10800 1 EEST} - {1035680400 7200 0 EET} - {1048986000 10800 1 EEST} - {1067130000 7200 0 EET} - {1080435600 10800 1 EEST} - {1099184400 7200 0 EET} - {1111885200 10800 1 EEST} - {1130634000 7200 0 EET} - {1143334800 10800 1 EEST} - {1162083600 7200 0 EET} - {1174784400 10800 1 EEST} - {1193533200 7200 0 EET} - {1206838800 10800 1 EEST} - {1224982800 7200 0 EET} - {1238288400 10800 1 EEST} - {1256432400 7200 0 EET} - {1269738000 10800 1 EEST} - {1288486800 7200 0 EET} - {1301187600 10800 1 EEST} - {1319936400 7200 0 EET} - {1332637200 10800 1 EEST} - {1351386000 7200 0 EET} - {1364691600 10800 1 EEST} - {1382835600 7200 0 EET} - {1396141200 10800 1 EEST} - {1414285200 7200 0 EET} - {1427590800 10800 1 EEST} - {1445734800 7200 0 EET} - {1459040400 10800 1 EEST} - {1477789200 7200 0 EET} - {1490490000 10800 1 EEST} - {1509238800 7200 0 EET} - {1521939600 10800 1 EEST} - {1540688400 7200 0 EET} - {1553994000 10800 1 EEST} - {1572138000 7200 0 EET} - {1585443600 10800 1 EEST} - {1603587600 7200 0 EET} - {1616893200 10800 1 EEST} - {1635642000 7200 0 EET} - {1648342800 10800 1 EEST} - {1667091600 7200 0 EET} - {1679792400 10800 1 EEST} - {1698541200 7200 0 EET} - {1711846800 10800 1 EEST} - {1729990800 7200 0 EET} - {1743296400 10800 1 EEST} - {1761440400 7200 0 EET} - {1774746000 10800 1 EEST} - {1792890000 7200 0 EET} - {1806195600 10800 1 EEST} - {1824944400 7200 0 EET} - {1837645200 10800 1 EEST} - {1856394000 7200 0 EET} - {1869094800 10800 1 EEST} - {1887843600 7200 0 EET} - {1901149200 10800 1 EEST} - {1919293200 7200 0 EET} - {1932598800 10800 1 EEST} - {1950742800 7200 0 EET} - {1964048400 10800 1 EEST} - {1982797200 7200 0 EET} - {1995498000 10800 1 EEST} - {2014246800 7200 0 EET} - {2026947600 10800 1 EEST} - {2045696400 7200 0 EET} - {2058397200 10800 1 EEST} - {2077146000 7200 0 EET} - {2090451600 10800 1 EEST} - {2108595600 7200 0 EET} - {2121901200 10800 1 EEST} - {2140045200 7200 0 EET} - {2153350800 10800 1 EEST} - {2172099600 7200 0 EET} - {2184800400 10800 1 EEST} - {2203549200 7200 0 EET} - {2216250000 10800 1 EEST} - {2234998800 7200 0 EET} - {2248304400 10800 1 EEST} - {2266448400 7200 0 EET} - {2279754000 10800 1 EEST} - {2297898000 7200 0 EET} - {2311203600 10800 1 EEST} - {2329347600 7200 0 EET} - {2342653200 10800 1 EEST} - {2361402000 7200 0 EET} - {2374102800 10800 1 EEST} - {2392851600 7200 0 EET} - {2405552400 10800 1 EEST} - {2424301200 7200 0 EET} - {2437606800 10800 1 EEST} - {2455750800 7200 0 EET} - {2469056400 10800 1 EEST} - {2487200400 7200 0 EET} - {2500506000 10800 1 EEST} - {2519254800 7200 0 EET} - {2531955600 10800 1 EEST} - {2550704400 7200 0 EET} - {2563405200 10800 1 EEST} - {2582154000 7200 0 EET} - {2595459600 10800 1 EEST} - {2613603600 7200 0 EET} - {2626909200 10800 1 EEST} - {2645053200 7200 0 EET} - {2658358800 10800 1 EEST} - {2676502800 7200 0 EET} - {2689808400 10800 1 EEST} - {2708557200 7200 0 EET} - {2721258000 10800 1 EEST} - {2740006800 7200 0 EET} - {2752707600 10800 1 EEST} - {2771456400 7200 0 EET} - {2784762000 10800 1 EEST} - {2802906000 7200 0 EET} - {2816211600 10800 1 EEST} - {2834355600 7200 0 EET} - {2847661200 10800 1 EEST} - {2866410000 7200 0 EET} - {2879110800 10800 1 EEST} - {2897859600 7200 0 EET} - {2910560400 10800 1 EEST} - {2929309200 7200 0 EET} - {2942010000 10800 1 EEST} - {2960758800 7200 0 EET} - {2974064400 10800 1 EEST} - {2992208400 7200 0 EET} - {3005514000 10800 1 EEST} - {3023658000 7200 0 EET} - {3036963600 10800 1 EEST} - {3055712400 7200 0 EET} - {3068413200 10800 1 EEST} - {3087162000 7200 0 EET} - {3099862800 10800 1 EEST} - {3118611600 7200 0 EET} - {3131917200 10800 1 EEST} - {3150061200 7200 0 EET} - {3163366800 10800 1 EEST} - {3181510800 7200 0 EET} - {3194816400 10800 1 EEST} - {3212960400 7200 0 EET} - {3226266000 10800 1 EEST} - {3245014800 7200 0 EET} - {3257715600 10800 1 EEST} - {3276464400 7200 0 EET} - {3289165200 10800 1 EEST} - {3307914000 7200 0 EET} - {3321219600 10800 1 EEST} - {3339363600 7200 0 EET} - {3352669200 10800 1 EEST} - {3370813200 7200 0 EET} - {3384118800 10800 1 EEST} - {3402867600 7200 0 EET} - {3415568400 10800 1 EEST} - {3434317200 7200 0 EET} - {3447018000 10800 1 EEST} - {3465766800 7200 0 EET} - {3479072400 10800 1 EEST} - {3497216400 7200 0 EET} - {3510522000 10800 1 EEST} - {3528666000 7200 0 EET} - {3541971600 10800 1 EEST} - {3560115600 7200 0 EET} - {3573421200 10800 1 EEST} - {3592170000 7200 0 EET} - {3604870800 10800 1 EEST} - {3623619600 7200 0 EET} - {3636320400 10800 1 EEST} - {3655069200 7200 0 EET} - {3668374800 10800 1 EEST} - {3686518800 7200 0 EET} - {3699824400 10800 1 EEST} - {3717968400 7200 0 EET} - {3731274000 10800 1 EEST} - {3750022800 7200 0 EET} - {3762723600 10800 1 EEST} - {3781472400 7200 0 EET} - {3794173200 10800 1 EEST} - {3812922000 7200 0 EET} - {3825622800 10800 1 EEST} - {3844371600 7200 0 EET} - {3857677200 10800 1 EEST} - {3875821200 7200 0 EET} - {3889126800 10800 1 EEST} - {3907270800 7200 0 EET} - {3920576400 10800 1 EEST} - {3939325200 7200 0 EET} - {3952026000 10800 1 EEST} - {3970774800 7200 0 EET} - {3983475600 10800 1 EEST} - {4002224400 7200 0 EET} - {4015530000 10800 1 EEST} - {4033674000 7200 0 EET} - {4046979600 10800 1 EEST} - {4065123600 7200 0 EET} - {4078429200 10800 1 EEST} - {4096573200 7200 0 EET} + {859680000 10800 1 EEST} + {877824000 7200 0 EET} + {891129600 10800 1 EEST} + {909273600 7200 0 EET} + {922579200 10800 1 EEST} + {941328000 7200 0 EET} + {954028800 10800 1 EEST} + {972777600 7200 0 EET} + {985478400 10800 1 EEST} + {1004227200 7200 0 EET} + {1017532800 10800 1 EEST} + {1035676800 7200 0 EET} + {1048982400 10800 1 EEST} + {1067126400 7200 0 EET} + {1080432000 10800 1 EEST} + {1099180800 7200 0 EET} + {1111881600 10800 1 EEST} + {1130630400 7200 0 EET} + {1143331200 10800 1 EEST} + {1162080000 7200 0 EET} + {1174780800 10800 1 EEST} + {1193529600 7200 0 EET} + {1206835200 10800 1 EEST} + {1224979200 7200 0 EET} + {1238284800 10800 1 EEST} + {1256428800 7200 0 EET} + {1269734400 10800 1 EEST} + {1288483200 7200 0 EET} + {1301184000 10800 1 EEST} + {1319932800 7200 0 EET} + {1332633600 10800 1 EEST} + {1351382400 7200 0 EET} + {1364688000 10800 1 EEST} + {1382832000 7200 0 EET} + {1396137600 10800 1 EEST} + {1414281600 7200 0 EET} + {1427587200 10800 1 EEST} + {1445731200 7200 0 EET} + {1459036800 10800 1 EEST} + {1477785600 7200 0 EET} + {1490486400 10800 1 EEST} + {1509235200 7200 0 EET} + {1521936000 10800 1 EEST} + {1540684800 7200 0 EET} + {1553990400 10800 1 EEST} + {1572134400 7200 0 EET} + {1585440000 10800 1 EEST} + {1603584000 7200 0 EET} + {1616889600 10800 1 EEST} + {1635638400 7200 0 EET} + {1648339200 10800 1 EEST} + {1667088000 7200 0 EET} + {1679788800 10800 1 EEST} + {1698537600 7200 0 EET} + {1711843200 10800 1 EEST} + {1729987200 7200 0 EET} + {1743292800 10800 1 EEST} + {1761436800 7200 0 EET} + {1774742400 10800 1 EEST} + {1792886400 7200 0 EET} + {1806192000 10800 1 EEST} + {1824940800 7200 0 EET} + {1837641600 10800 1 EEST} + {1856390400 7200 0 EET} + {1869091200 10800 1 EEST} + {1887840000 7200 0 EET} + {1901145600 10800 1 EEST} + {1919289600 7200 0 EET} + {1932595200 10800 1 EEST} + {1950739200 7200 0 EET} + {1964044800 10800 1 EEST} + {1982793600 7200 0 EET} + {1995494400 10800 1 EEST} + {2014243200 7200 0 EET} + {2026944000 10800 1 EEST} + {2045692800 7200 0 EET} + {2058393600 10800 1 EEST} + {2077142400 7200 0 EET} + {2090448000 10800 1 EEST} + {2108592000 7200 0 EET} + {2121897600 10800 1 EEST} + {2140041600 7200 0 EET} + {2153347200 10800 1 EEST} + {2172096000 7200 0 EET} + {2184796800 10800 1 EEST} + {2203545600 7200 0 EET} + {2216246400 10800 1 EEST} + {2234995200 7200 0 EET} + {2248300800 10800 1 EEST} + {2266444800 7200 0 EET} + {2279750400 10800 1 EEST} + {2297894400 7200 0 EET} + {2311200000 10800 1 EEST} + {2329344000 7200 0 EET} + {2342649600 10800 1 EEST} + {2361398400 7200 0 EET} + {2374099200 10800 1 EEST} + {2392848000 7200 0 EET} + {2405548800 10800 1 EEST} + {2424297600 7200 0 EET} + {2437603200 10800 1 EEST} + {2455747200 7200 0 EET} + {2469052800 10800 1 EEST} + {2487196800 7200 0 EET} + {2500502400 10800 1 EEST} + {2519251200 7200 0 EET} + {2531952000 10800 1 EEST} + {2550700800 7200 0 EET} + {2563401600 10800 1 EEST} + {2582150400 7200 0 EET} + {2595456000 10800 1 EEST} + {2613600000 7200 0 EET} + {2626905600 10800 1 EEST} + {2645049600 7200 0 EET} + {2658355200 10800 1 EEST} + {2676499200 7200 0 EET} + {2689804800 10800 1 EEST} + {2708553600 7200 0 EET} + {2721254400 10800 1 EEST} + {2740003200 7200 0 EET} + {2752704000 10800 1 EEST} + {2771452800 7200 0 EET} + {2784758400 10800 1 EEST} + {2802902400 7200 0 EET} + {2816208000 10800 1 EEST} + {2834352000 7200 0 EET} + {2847657600 10800 1 EEST} + {2866406400 7200 0 EET} + {2879107200 10800 1 EEST} + {2897856000 7200 0 EET} + {2910556800 10800 1 EEST} + {2929305600 7200 0 EET} + {2942006400 10800 1 EEST} + {2960755200 7200 0 EET} + {2974060800 10800 1 EEST} + {2992204800 7200 0 EET} + {3005510400 10800 1 EEST} + {3023654400 7200 0 EET} + {3036960000 10800 1 EEST} + {3055708800 7200 0 EET} + {3068409600 10800 1 EEST} + {3087158400 7200 0 EET} + {3099859200 10800 1 EEST} + {3118608000 7200 0 EET} + {3131913600 10800 1 EEST} + {3150057600 7200 0 EET} + {3163363200 10800 1 EEST} + {3181507200 7200 0 EET} + {3194812800 10800 1 EEST} + {3212956800 7200 0 EET} + {3226262400 10800 1 EEST} + {3245011200 7200 0 EET} + {3257712000 10800 1 EEST} + {3276460800 7200 0 EET} + {3289161600 10800 1 EEST} + {3307910400 7200 0 EET} + {3321216000 10800 1 EEST} + {3339360000 7200 0 EET} + {3352665600 10800 1 EEST} + {3370809600 7200 0 EET} + {3384115200 10800 1 EEST} + {3402864000 7200 0 EET} + {3415564800 10800 1 EEST} + {3434313600 7200 0 EET} + {3447014400 10800 1 EEST} + {3465763200 7200 0 EET} + {3479068800 10800 1 EEST} + {3497212800 7200 0 EET} + {3510518400 10800 1 EEST} + {3528662400 7200 0 EET} + {3541968000 10800 1 EEST} + {3560112000 7200 0 EET} + {3573417600 10800 1 EEST} + {3592166400 7200 0 EET} + {3604867200 10800 1 EEST} + {3623616000 7200 0 EET} + {3636316800 10800 1 EEST} + {3655065600 7200 0 EET} + {3668371200 10800 1 EEST} + {3686515200 7200 0 EET} + {3699820800 10800 1 EEST} + {3717964800 7200 0 EET} + {3731270400 10800 1 EEST} + {3750019200 7200 0 EET} + {3762720000 10800 1 EEST} + {3781468800 7200 0 EET} + {3794169600 10800 1 EEST} + {3812918400 7200 0 EET} + {3825619200 10800 1 EEST} + {3844368000 7200 0 EET} + {3857673600 10800 1 EEST} + {3875817600 7200 0 EET} + {3889123200 10800 1 EEST} + {3907267200 7200 0 EET} + {3920572800 10800 1 EEST} + {3939321600 7200 0 EET} + {3952022400 10800 1 EEST} + {3970771200 7200 0 EET} + {3983472000 10800 1 EEST} + {4002220800 7200 0 EET} + {4015526400 10800 1 EEST} + {4033670400 7200 0 EET} + {4046976000 10800 1 EEST} + {4065120000 7200 0 EET} + {4078425600 10800 1 EEST} + {4096569600 7200 0 EET} } diff --git a/library/tzdata/Europe/Simferopol b/library/tzdata/Europe/Simferopol index f6431fa..3e4b60a 100644 --- a/library/tzdata/Europe/Simferopol +++ b/library/tzdata/Europe/Simferopol @@ -42,7 +42,6 @@ set TZData(:Europe/Simferopol) { {796165200 14400 1 MSD} {811886400 10800 0 MSK} {828219600 14400 1 MSD} - {828230400 14400 1 MSD} {852066000 10800 0 MSK} {859683600 10800 0 EEST} {877827600 7200 0 EET} diff --git a/library/tzdata/Europe/Sofia b/library/tzdata/Europe/Sofia index 8fd55f6..a07f3bc 100644 --- a/library/tzdata/Europe/Sofia +++ b/library/tzdata/Europe/Sofia @@ -18,7 +18,6 @@ set TZData(:Europe/Sofia) { {355266000 10800 1 EEST} {370393200 7200 0 EET} {386715600 10800 1 EEST} - {401842800 10800 0 EEST} {401846400 7200 0 EET} {417571200 10800 1 EEST} {433296000 7200 0 EET} diff --git a/library/tzdata/Europe/Tallinn b/library/tzdata/Europe/Tallinn index 17f14e6..e0f22a5 100644 --- a/library/tzdata/Europe/Tallinn +++ b/library/tzdata/Europe/Tallinn @@ -53,8 +53,7 @@ set TZData(:Europe/Tallinn) { {906415200 10800 0 EEST} {909277200 7200 0 EET} {922582800 10800 1 EEST} - {941331600 7200 0 EET} - {941407200 7200 0 EET} + {941335200 7200 0 EET} {1014242400 7200 0 EET} {1017536400 10800 1 EEST} {1035680400 7200 0 EET} -- cgit v0.12 From 2c66fc643c1e662526ad4cd59b0b1836b171a35c Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 12 Aug 2015 16:37:28 +0000 Subject: New test io-53.18 adapted from demo script in [32ae34e63a]. This test segfaults without changes to source code. This checkin also contains a revised implementationf of [chan postevent] that stops calling Tcl_NotifyChannel() directly, and queues an event to do it instead. This stops the segfault, but causes tests iocmd-31.[67] to fail. Need advice on whether that matters. --- generic/tclIORChan.c | 26 +++++++++++++++++++++- tests/io.test | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index bbb5b88..6592f9e 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -741,6 +741,24 @@ TclChanCreateObjCmd( *---------------------------------------------------------------------- */ +typedef struct PostEvent { + Tcl_Event event; /* Basic event data, has to be first item */ + Tcl_Channel chan; + int events; +} PostEvent; + +static int +CallNotify( + Tcl_Event *evPtr, + int flags) +{ + PostEvent *pevPtr = (PostEvent *)evPtr; + + Tcl_NotifyChannel(pevPtr->chan, pevPtr->events); + TclChannelRelease(pevPtr->chan); + return 1; +} + int TclChanPostEventObjCmd( ClientData clientData, @@ -769,6 +787,7 @@ TclChanPostEventObjCmd( int events; /* Mask of events to post */ ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ Tcl_HashEntry* hPtr; /* Entry in the above map */ + PostEvent *pevPtr; /* * Number of arguments... @@ -857,7 +876,12 @@ TclChanPostEventObjCmd( * We have the channel and the events to post. */ - Tcl_NotifyChannel(chan, events); + pevPtr = (PostEvent *)ckalloc(sizeof(PostEvent)); + pevPtr->event.proc = CallNotify; + pevPtr->chan = chan; + pevPtr->events = events; + TclChannelPreserve(chan); + Tcl_QueueEvent((Tcl_Event *)pevPtr, TCL_QUEUE_HEAD); /* * Squash interp results left by the event script. diff --git a/tests/io.test b/tests/io.test index 50c5808..46e3f05 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7886,6 +7886,68 @@ test io-53.15 {[ed29c4da21] DoRead: fblocked seen as error} -setup { removeFile out } -result 100 +test io-53.18 {[32ae34e63a] recursize CopyData} -setup { + proc driver {cmd args} { + variable buffer + variable index + set chan [lindex $args 0] + switch -- $cmd { + initialize { + set index($chan) 0 + set buffer($chan) [encoding convertto utf-8 \ + [string repeat a 100]] + return {initialize finalize watch read} + } + finalize { + unset index($chan) buffer($chan) + return + } + watch { + if {"read" in [lindex $args 1]} { + chan postevent $chan read + } + return + } + read { + set n [lindex $args 1] + set new [expr {$index($chan) + $n}] + set result [string range $buffer($chan) $index($chan) $new-1] + set index($chan) $new + return $result + } + } + } + proc more {c outChan bytes args} { + if {[eof $c]} { + set ::done eof + catch {close $c} + return + } + if {[llength $args]} { + set ::done error + } else { + chan copy $c $outChan -command [list [namespace which more] $c $outChan] + } + } + set c [chan create read [namespace which driver]] + chan configure $c -encoding utf-8 + set out [makeFile {} out] + set outChan [open $out w] + # Different encoding to force use of DoReadChars() + chan configure $outChan -encoding iso8859-1 +} -body { + after 2000 {set ::done timeout} + chan copy $c $outChan -size 99 -command [list [namespace which more] $c $outChan] + vwait ::done + set ::done +} -cleanup { + close $outChan + removeFile out + rename driver {} + rename more {} + unset ::done +} -result eof + test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive # event loops when there is buffered data on the channel. -- cgit v0.12 From 1db16b915a2fc6e315586502121d1ab7c9b39a59 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 12 Aug 2015 17:49:42 +0000 Subject: Adjustments to failing tests to account for changed [chan postevent]. --- tests/ioCmd.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 5a76d48..c706e50 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -1949,26 +1949,26 @@ test iocmd-31.6 {chan postevent, posted events do happen} -match glob -body { set c [chan create {r w} foo] note [fileevent $c readable {note TOCK}] set stop [after 10000 {note TIMEOUT}] - after 1000 {note [chan postevent $c r]} + after 1000 {chan postevent $c r} vwait ::res catch {after cancel $stop} close $c rename foo {} set res -} -result {{watch rc* read} {} TOCK {} {watch rc* {}}} +} -result {{watch rc* read} {} TOCK {watch rc* {}}} test iocmd-31.7 {chan postevent, posted events do happen} -match glob -body { set res {} proc foo {args} {oninit; onfinal; track; return} set c [chan create {r w} foo] note [fileevent $c writable {note TOCK}] set stop [after 10000 {note TIMEOUT}] - after 1000 {note [chan postevent $c w]} + after 1000 {chan postevent $c w} vwait ::res catch {after cancel $stop} close $c rename foo {} set res -} -result {{watch rc* write} {} TOCK {} {watch rc* {}}} +} -result {{watch rc* write} {} TOCK {watch rc* {}}} test iocmd-31.8 {chan postevent after close throws error} -match glob -setup { proc foo {args} {oninit; onfinal; track; return} proc dummy args { return } -- cgit v0.12 From 13850d4952b34d30e3e2ae68c3cb2c10c0019737 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 13 Aug 2015 16:45:03 +0000 Subject: A bit of code safety, and then a test demonstrating next issue. --- generic/tclIORChan.c | 5 +++- tests/io.test | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 6592f9e..85a35b8 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -753,8 +753,11 @@ CallNotify( int flags) { PostEvent *pevPtr = (PostEvent *)evPtr; + Channel *chanPtr = (Channel *)pevPtr->chan; - Tcl_NotifyChannel(pevPtr->chan, pevPtr->events); + if (chanPtr->typePtr != NULL) { + Tcl_NotifyChannel(pevPtr->chan, pevPtr->events); + } TclChannelRelease(pevPtr->chan); return 1; } diff --git a/tests/io.test b/tests/io.test index 46e3f05..840274d 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7936,7 +7936,7 @@ test io-53.18 {[32ae34e63a] recursize CopyData} -setup { # Different encoding to force use of DoReadChars() chan configure $outChan -encoding iso8859-1 } -body { - after 2000 {set ::done timeout} + after 100 {set ::done timeout} chan copy $c $outChan -size 99 -command [list [namespace which more] $c $outChan] vwait ::done set ::done @@ -7948,6 +7948,68 @@ test io-53.18 {[32ae34e63a] recursize CopyData} -setup { unset ::done } -result eof +test io-53.19 {[e0a7b3e5f8] DoRead calls to UpdateInterest} -setup { + proc driver {cmd args} { + variable buffer + variable index + set chan [lindex $args 0] + switch -- $cmd { + initialize { + set index($chan) 0 + set buffer($chan) [encoding convertto utf-8 \ + [string repeat a 100]] + return {initialize finalize watch read} + } + finalize { + unset index($chan) buffer($chan) + return + } + watch { + if {"read" in [lindex $args 1]} { + chan postevent $chan read + } + return + } + read { + set n [lindex $args 1] + set new [expr {$index($chan) + $n}] + set result [string range $buffer($chan) $index($chan) $new-1] + set index($chan) $new + return $result + } + } + } + proc more {c outChan bytes args} { + if {[eof $c]} { + set ::done eof + catch {close $c} + return + } + if {[llength $args]} { + set ::done error + } else { + chan copy $c $outChan -size 30 -command [list [namespace which more] $c $outChan] + } + } + set c [chan create read [namespace which driver]] + chan configure $c -encoding utf-8 -buffersize 20 + set out [makeFile {} out] + set outChan [open $out w] + # Different encoding to force use of DoReadChar() + chan configure $outChan -encoding iso8859-1 +} -body { + after 100 {set ::done timeout} + chan copy $c $outChan -size 30 -command [list [namespace which more] $c $outChan] + vwait ::done + set ::done +} -cleanup { + catch {close $outChan} + removeFile out + rename driver {} + rename more {} + unset ::done +} -result eof + test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive # event loops when there is buffered data on the channel. -- cgit v0.12 From bf4a5c995fc82d4d7841bdf0970e027623904529 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 13 Aug 2015 17:02:04 +0000 Subject: Disable the filtering of ReflectWatch so that every UpdateInterest() call flows through to become a [driver watch] evaluation. This makes new test io-53.19 pass. It also makes a collection of 10 test in ioCmd.test start failing, all of which are recording detailed reflected channel driver command evaluation. The now unfiltered [driver watch] change this record without (at least apparently) changing any behavior. Need review. --- generic/tclIORChan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 85a35b8..b059c79 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -1535,7 +1535,7 @@ ReflectWatch( mask &= rcPtr->mode; - if (mask == rcPtr->interest) { + if (0 && mask == rcPtr->interest) { /* * Same old, same old, why should we do something? */ -- cgit v0.12 From 65644eeb87cb55253126bba237afb569d3fe6f4a Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 13 Aug 2015 19:28:26 +0000 Subject: New test attempting to demo Bug [e0a7b3e5f8]. Doesn't work yet. --- tests/io.test | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/tests/io.test b/tests/io.test index 840274d..914cbca 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7886,7 +7886,7 @@ test io-53.15 {[ed29c4da21] DoRead: fblocked seen as error} -setup { removeFile out } -result 100 -test io-53.18 {[32ae34e63a] recursize CopyData} -setup { +test io-53.18 {[32ae34e63a] recursive CopyData} -setup { proc driver {cmd args} { variable buffer variable index @@ -7948,7 +7948,7 @@ test io-53.18 {[32ae34e63a] recursize CopyData} -setup { unset ::done } -result eof -test io-53.19 {[e0a7b3e5f8] DoRead calls to UpdateInterest} -setup { +test io-53.19 {[32ae34e63a] stop ReflectWatch filtering} -setup { proc driver {cmd args} { variable buffer variable index @@ -7995,7 +7995,7 @@ test io-53.19 {[e0a7b3e5f8] DoRead calls to UpdateInterest} -setup { chan configure $c -encoding utf-8 -buffersize 20 set out [makeFile {} out] set outChan [open $out w] - # Different encoding to force use of DoReadChar() + # Different encoding to force use of DoReadChars() chan configure $outChan -encoding iso8859-1 } -body { after 100 {set ::done timeout} @@ -8010,6 +8010,68 @@ test io-53.19 {[e0a7b3e5f8] DoRead calls to UpdateInterest} -setup { unset ::done } -result eof +test io-53.20 {[e0a7b3e5f8] DoRead calls to UpdateInterest} -setup { + proc driver {cmd args} { + variable buffer + variable index + set chan [lindex $args 0] + switch -- $cmd { + initialize { + set index($chan) 0 + set buffer($chan) [encoding convertto utf-8 \ + [string repeat a 100]] + return {initialize finalize watch read} + } + finalize { + unset index($chan) buffer($chan) + return + } + watch { + if {"read" in [lindex $args 1]} { + chan postevent $chan read + } + return + } + read { + set n [lindex $args 1] + set new [expr {$index($chan) + $n}] + set result [string range $buffer($chan) $index($chan) $new-1] + set index($chan) $new + return $result + } + } + } + proc more {c outChan bytes args} { + if {[eof $c]} { + set ::done eof + catch {close $c} + return + } + if {[llength $args]} { + set ::done error + } else { + chan copy $c $outChan -size 10 -command [list [namespace which more] $c $outChan] + } + } + set c [chan create read [namespace which driver]] + chan configure $c -encoding utf-8 -buffersize 20 + set out [makeFile {} out] + set outChan [open $out w] + # Same encoding to force use of DoRead() + chan configure $outChan -encoding utf-8 +} -body { + after 100 {set ::done timeout} + chan copy $c $outChan -size 10 -command [list [namespace which more] $c $outChan] + vwait ::done + set ::done +} -cleanup { + catch {close $outChan} + removeFile out + rename driver {} + rename more {} + unset ::done +} -result eof + test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive # event loops when there is buffered data on the channel. -- cgit v0.12 From 2ef36c8edb60b8da26aeb9947f6d2cdd1d4bf6c1 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 17 Aug 2015 18:22:18 +0000 Subject: [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. --- generic/regc_nfa.c | 1 + generic/regcomp.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 2de7e14..1d572c3 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -49,6 +49,7 @@ newnfa( nfa = (struct nfa *) MALLOC(sizeof(struct nfa)); if (nfa == NULL) { + ERR(REG_ESPACE); return NULL; } diff --git a/generic/regcomp.c b/generic/regcomp.c index 77f2f20..d23076b 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -982,6 +982,7 @@ parseqatom( NOERR(); assert(v->nextvalue > 0); atom = subre(v, 'b', BACKR, lp, rp); + NOERR(); subno = v->nextvalue; atom->subno = subno; EMPTYARC(lp, rp); /* temporarily, so there's something */ @@ -1129,6 +1130,7 @@ parseqatom( */ t = subre(v, '.', COMBINE(qprefer, atom->flags), lp, rp); + NOERR(); t->left = atom; atomp = &t->left; @@ -1142,6 +1144,7 @@ parseqatom( assert(top->op == '=' && top->left == NULL && top->right == NULL); top->left = subre(v, '=', top->flags, top->begin, lp); + NOERR(); top->op = '.'; top->right = t; -- cgit v0.12 From 74cd974b89d05dd8159d85d730e6aadaa34b3e27 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 19 Aug 2015 15:23:25 +0000 Subject: Fix [00189c4afcb9e2586301d711f71383e48817a72d|00189c4afc]: Allow semi-static UCRT build on Windows with VC 14.0 --- generic/tclMain.c | 3 +++ win/makefile.vc | 22 ++++++++++++++++++++-- win/rules.vc | 7 +++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/generic/tclMain.c b/generic/tclMain.c index 5e5109b..b2206f8 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -28,7 +28,10 @@ * source directory to make their own modified versions). */ +#if defined _MSC_VER && _MSC_VER < 1900 +/* isatty is always defined on MSVC 14.0, but not necessarily as CRTIMPORT. */ extern CRTIMPORT int isatty(int fd); +#endif static Tcl_Obj *tclStartupScriptPath = NULL; static Tcl_Obj *tclStartupScriptEncoding = NULL; diff --git a/win/makefile.vc b/win/makefile.vc index 1f957ea..24a92ba 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -70,7 +70,7 @@ the build instructions. # Sets where to install Tcl from the built binaries. # C:\Progra~1\Tcl is assumed when not specified. # -# OPTS=loimpact,msvcrt,static,staticpkg,symbols,threads,profile,unchecked,none +# OPTS=loimpact,msvcrt,static,staticpkg,symbols,threads,profile,unchecked,ucrt,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. @@ -94,6 +94,11 @@ the build instructions. # unchecked = Allows a symbols build to not use the debug # enabled runtime (msvcrt.dll not msvcrtd.dll # or libcmt.lib not libcmtd.lib). +# ucrt= Uses ucrt.lib and libvcruntime.lib, which +# ensures Tcl will run on machines with only the subset +# of the C runtime that is part of the operating system. +# If omitted, builds with VC 14.0 or later will require +# the full C runtime redistributable. # # STATS=compdbg,memdbg,none # Sets optional memory and bytecode compiler debugging code added @@ -438,7 +443,13 @@ cdebug = -Zi -WX $(DEBUGFLAGS) cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\ -!if $(MSVCRT) +!if $(UCRT) +!if $(DEBUG) && !$(UNCHECKED) +crt = -MDd +!else +crt = -MT +!endif +!elseif $(MSVCRT) !if $(DEBUG) && !$(UNCHECKED) crt = -MDd !else @@ -480,6 +491,10 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug) lflags = $(lflags) -profile !endif +!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED)) +lflags = $(lflags) -nodefaultlib:libucrt.lib +!endif + !if $(ALIGN98_HACK) && !$(STATIC_BUILD) ### Align sections for PE size savings. lflags = $(lflags) -opt:nowin98 @@ -504,6 +519,9 @@ baselibs = kernel32.lib user32.lib ws2_32.lib baselibs = $(baselibs) bufferoverflowU.lib !endif !endif +!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED)) +baselibs = $(baselibs) ucrt.lib +!endif #--------------------------------------------------------------------- # TclTest flags diff --git a/win/rules.vc b/win/rules.vc index 78a167a..9247c59 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -223,6 +223,7 @@ LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 USE_THREAD_ALLOC = 0 UNCHECKED = 0 +UCRT = 0 !else !if [nmakehlp -f $(OPTS) "static"] !message *** Doing static @@ -302,6 +303,12 @@ UNCHECKED = 1 UNCHECKED = 0 !endif !endif +!if [nmakehlp -f $(OPTS) "ucrt"] && $(VCVERSION) >= 1900 +!message *** Doing UCRT +UCRT = 1 +!else +UCRT = 0 +!endif #---------------------------------------------------------- # Figure-out how to name our intermediate and output directories. -- cgit v0.12 From 811b14e555c23a063e1c1d0b17627a0484624234 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 21 Aug 2015 10:40:48 +0000 Subject: Eliminate some (harmless) compiler warnings. No functional change. --- generic/tclThread.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/generic/tclThread.c b/generic/tclThread.c index 087d735..17071e5 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -24,7 +24,7 @@ typedef struct { int num; /* Number of objects remembered */ int max; /* Max size of the array */ - char **list; /* List of pointers */ + void **list; /* List of pointers */ } SyncObjRecord; static SyncObjRecord keyRecord = {0, 0, NULL}; @@ -35,8 +35,8 @@ static SyncObjRecord condRecord = {0, 0, NULL}; * Prototypes of functions used only in this file. */ -static void ForgetSyncObject(char *objPtr, SyncObjRecord *recPtr); -static void RememberSyncObject(char *objPtr, +static void ForgetSyncObject(void *objPtr, SyncObjRecord *recPtr); +static void RememberSyncObject(void *objPtr, SyncObjRecord *recPtr); /* @@ -94,7 +94,7 @@ Tcl_GetThreadData( result = ckalloc((size_t) size); memset(result, 0, (size_t) size); *keyPtr = (Tcl_ThreadDataKey)result; - RememberSyncObject((char *) keyPtr, &keyRecord); + RememberSyncObject(keyPtr, &keyRecord); } result = * (void **) keyPtr; #endif /* TCL_THREADS */ @@ -153,10 +153,10 @@ TclThreadDataKeyGet( static void RememberSyncObject( - char *objPtr, /* Pointer to sync object */ + void *objPtr, /* Pointer to sync object */ SyncObjRecord *recPtr) /* Record of sync objects */ { - char **newList; + void **newList; int i, j; @@ -178,7 +178,7 @@ RememberSyncObject( if (recPtr->num >= recPtr->max) { recPtr->max += 8; - newList = (char **) ckalloc(recPtr->max * sizeof(char *)); + newList = (void **) ckalloc(recPtr->max * sizeof(char *)); for (i=0,j=0 ; inum ; i++) { if (recPtr->list[i] != NULL) { newList[j++] = recPtr->list[i]; @@ -214,7 +214,7 @@ RememberSyncObject( static void ForgetSyncObject( - char *objPtr, /* Pointer to sync object */ + void *objPtr, /* Pointer to sync object */ SyncObjRecord *recPtr) /* Record of sync objects */ { int i; @@ -248,7 +248,7 @@ void TclRememberMutex( Tcl_Mutex *mutexPtr) { - RememberSyncObject((char *)mutexPtr, &mutexRecord); + RememberSyncObject(mutexPtr, &mutexRecord); } /* @@ -276,7 +276,7 @@ Tcl_MutexFinalize( TclpFinalizeMutex(mutexPtr); #endif TclpMasterLock(); - ForgetSyncObject((char *) mutexPtr, &mutexRecord); + ForgetSyncObject(mutexPtr, &mutexRecord); TclpMasterUnlock(); } @@ -303,7 +303,9 @@ void TclMutexUnlockAndFinalize( Tcl_Mutex *mutexPtr) { +#ifdef TCL_THREADS Tcl_Mutex mutex; +#endif TclpMasterLock(); TclpMutexLock(); #ifdef TCL_THREADS @@ -338,7 +340,7 @@ void TclRememberCondition( Tcl_Condition *condPtr) { - RememberSyncObject((char *) condPtr, &condRecord); + RememberSyncObject(condPtr, &condRecord); } /* @@ -366,7 +368,7 @@ Tcl_ConditionFinalize( TclpFinalizeCondition(condPtr); #endif TclpMasterLock(); - ForgetSyncObject((char *) condPtr, &condRecord); + ForgetSyncObject(condPtr, &condRecord); TclpMasterUnlock(); } -- cgit v0.12 From 03fb986ef80ace8909712934c47c86a26a75d027 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 25 Aug 2015 09:39:16 +0000 Subject: Removed "ucrt" as configureable option: If building with VC2014, it's the recommended way to build Tcl. --- win/makefile.vc | 19 ++++--------------- win/rules.vc | 7 ------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 24a92ba..267f53f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -70,7 +70,7 @@ the build instructions. # Sets where to install Tcl from the built binaries. # C:\Progra~1\Tcl is assumed when not specified. # -# OPTS=loimpact,msvcrt,static,staticpkg,symbols,threads,profile,unchecked,ucrt,none +# OPTS=loimpact,msvcrt,static,staticpkg,symbols,threads,profile,unchecked,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. @@ -94,11 +94,6 @@ the build instructions. # unchecked = Allows a symbols build to not use the debug # enabled runtime (msvcrt.dll not msvcrtd.dll # or libcmt.lib not libcmtd.lib). -# ucrt= Uses ucrt.lib and libvcruntime.lib, which -# ensures Tcl will run on machines with only the subset -# of the C runtime that is part of the operating system. -# If omitted, builds with VC 14.0 or later will require -# the full C runtime redistributable. # # STATS=compdbg,memdbg,none # Sets optional memory and bytecode compiler debugging code added @@ -443,13 +438,7 @@ cdebug = -Zi -WX $(DEBUGFLAGS) cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\ -!if $(UCRT) -!if $(DEBUG) && !$(UNCHECKED) -crt = -MDd -!else -crt = -MT -!endif -!elseif $(MSVCRT) +!if $(MSVCRT) !if $(DEBUG) && !$(UNCHECKED) crt = -MDd !else @@ -491,7 +480,7 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug) lflags = $(lflags) -profile !endif -!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED)) +!if $(MSVCRT) && !($(DEBUG) && !$(UNCHECKED)) && $(VCVERSION) >= 1900 lflags = $(lflags) -nodefaultlib:libucrt.lib !endif @@ -519,7 +508,7 @@ baselibs = kernel32.lib user32.lib ws2_32.lib baselibs = $(baselibs) bufferoverflowU.lib !endif !endif -!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED)) +!if $(MSVCRT) && !($(DEBUG) && !$(UNCHECKED)) && $(VCVERSION) >= 1900 baselibs = $(baselibs) ucrt.lib !endif diff --git a/win/rules.vc b/win/rules.vc index 9247c59..78a167a 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -223,7 +223,6 @@ LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 USE_THREAD_ALLOC = 0 UNCHECKED = 0 -UCRT = 0 !else !if [nmakehlp -f $(OPTS) "static"] !message *** Doing static @@ -303,12 +302,6 @@ UNCHECKED = 1 UNCHECKED = 0 !endif !endif -!if [nmakehlp -f $(OPTS) "ucrt"] && $(VCVERSION) >= 1900 -!message *** Doing UCRT -UCRT = 1 -!else -UCRT = 0 -!endif #---------------------------------------------------------- # Figure-out how to name our intermediate and output directories. -- cgit v0.12 From 4b8109368625d2b5d9c74f7f2375925b57860efa Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 25 Aug 2015 11:29:58 +0000 Subject: Fix [0df7a1ec2674a76a]: unix/tclUnixFile.c: return value of call to TclpGetCwd in TclpFindExecutable is not checked, variable cwd is used uninitialized. --- unix/tclUnixFile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index c5f75a7..0a2099c 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -155,6 +155,11 @@ TclpFindExecutable( goto done; } + if (TclpGetCwd(NULL, &cwd) == NULL) { + TclSetObjNameOfExecutable(Tcl_NewObj(), NULL); + goto done; + } + /* * The name is relative to the current working directory. First strip off * a leading "./", if any, then add the full path name of the current @@ -168,8 +173,6 @@ TclpFindExecutable( Tcl_DStringInit(&nameString); Tcl_DStringAppend(&nameString, name, -1); - TclpGetCwd(NULL, &cwd); - Tcl_DStringFree(&buffer); Tcl_UtfToExternalDString(NULL, Tcl_DStringValue(&cwd), Tcl_DStringLength(&cwd), &buffer); -- cgit v0.12 From c1317549fb6be33f63661c5d7fe0948c1408e579 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 27 Aug 2015 14:49:06 +0000 Subject: Fix [7703ff1082]: extra argument ?pattern? of parray is not documented --- doc/library.n | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/library.n b/doc/library.n index e9f81ac..79817f2 100644 --- a/doc/library.n +++ b/doc/library.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH library n "8.0" Tcl "Tcl Built-In Commands" .so man.macros .BS @@ -20,7 +20,7 @@ auto_execok, auto_import, auto_load, auto_mkindex, auto_mkindex_old, auto_qualif \fBauto_qualify \fIcommand namespace\fR \fBauto_reset\fR \fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR -\fBparray \fIarrayName\fR +\fBparray \fIarrayName\fR ?\fIpattern\fR? \fBtcl_endOfWord \fIstr start\fR \fBtcl_startOfNextWord \fIstr start\fR \fBtcl_startOfPreviousWord \fIstr start\fR @@ -133,7 +133,7 @@ as its first characters then it is assumed to be a procedure definition and the next word of the line is taken as the procedure's name. Procedure definitions that do not appear in this way (e.g. they -have spaces before the \fBproc\fR) will not be indexed. If your +have spaces before the \fBproc\fR) will not be indexed. If your script contains .QW dangerous code, such as global initialization @@ -171,7 +171,7 @@ performing the actual auto-loading of functions at runtime. This is a standard search procedure for use by extensions during their initialization. They call this procedure to look for their script library in several standard directories. -The last component of the name of the library directory is +The last component of the name of the library directory is normally \fIbasenameversion\fR (e.g., tk8.0), but it might be .QW library @@ -189,9 +189,10 @@ bin or bin/\fIarch\fR directory; relative to the executable file in the current build tree; relative to the executable file in a parallel build tree. .TP -\fBparray \fIarrayName\fR +\fBparray \fIarrayName\fR\ ?\fIpattern\fR? Prints on standard output the names and values of all the elements -in the array \fIarrayName\fR. +in the array \fIarrayName\fR that match \fIpattern\fR (using the +matching rules of \fBstring match\fR). \fBArrayName\fR must be an array accessible to the caller of \fBparray\fR. It may be either local or global. .TP @@ -270,7 +271,7 @@ a default value is used. .TP \fBenv(TCLLIBPATH)\fR If set, then it must contain a valid Tcl list giving directories to -search during auto-load operations. Directories must be specified in +search during auto-load operations. Directories must be specified in Tcl format, using .QW / as the path separator, regardless of platform. @@ -295,4 +296,4 @@ Unix, words are comprised of numbers, letters or underscores. .SH "SEE ALSO" info(n), re_syntax(n) .SH KEYWORDS -auto-exec, auto-load, library, unknown, word, whitespace +auto-exec, auto-load, library, unknown, word, whitespace -- cgit v0.12 From 7c7f735cb897623da6e39d29a076ce7bb0b4b1e4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 28 Aug 2015 10:23:30 +0000 Subject: Completing [00189c4afc]: Allow semi-static UCRT build on Windows with VC 14.0. Now for the configure/makefile build. --- win/configure | 20 ++++++++++++++++++-- win/tcl.m4 | 20 ++++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/win/configure b/win/configure index 99519a8..f417981 100755 --- a/win/configure +++ b/win/configure @@ -3690,6 +3690,13 @@ echo "${ECHO_T}using shared flags" >&6 EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" SHLIB_LD_LIBS='${LIBS}' + case "x`echo \${VisualStudioVersion}`" in + x14*) + lflags="${lflags} -nodefaultlib:libucrt.lib" + ;; + *) + ;; + esac fi # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. @@ -3727,6 +3734,15 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 fi LIBS="user32.lib advapi32.lib ws2_32.lib" + + case "x`echo \${VisualStudioVersion}`" in + x14*) + LIBS="$LIBS ucrt.lib" + ;; + *) + ;; + esac + if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the @@ -3801,7 +3817,7 @@ fi CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" # Avoid 'unresolved external symbol __security_cookie' errors. # c.f. http://support.microsoft.com/?id=894573 @@ -3813,7 +3829,7 @@ fi CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" - lflags="-nologo" + lflags="${lflags} -nologo" LINKBIN="link" fi diff --git a/win/tcl.m4 b/win/tcl.m4 index 44fd47e..6f10a96 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -783,6 +783,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" SHLIB_LD_LIBS='${LIBS}' + case "x`echo \${VisualStudioVersion}`" in + x14*) + lflags="${lflags} -nodefaultlib:libucrt.lib" + ;; + *) + ;; + esac fi # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. @@ -817,6 +824,15 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi LIBS="user32.lib advapi32.lib ws2_32.lib" + + case "x`echo \${VisualStudioVersion}`" in + x14*) + LIBS="$LIBS ucrt.lib" + ;; + *) + ;; + esac + if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the @@ -831,7 +847,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" # Avoid 'unresolved external symbol __security_cookie' errors. # c.f. http://support.microsoft.com/?id=894573 @@ -843,7 +859,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" - lflags="-nologo" + lflags="${lflags} -nologo" LINKBIN="link" fi -- cgit v0.12 From 8dd9711e5b72a7dcc4ee36b04d6876afac3bd73e Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 30 Aug 2015 20:20:09 +0000 Subject: [7703ff1082] Improved wording. --- doc/library.n | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/library.n b/doc/library.n index 79817f2..c86da3e 100644 --- a/doc/library.n +++ b/doc/library.n @@ -189,10 +189,11 @@ bin or bin/\fIarch\fR directory; relative to the executable file in the current build tree; relative to the executable file in a parallel build tree. .TP -\fBparray \fIarrayName\fR\ ?\fIpattern\fR? -Prints on standard output the names and values of all the elements -in the array \fIarrayName\fR that match \fIpattern\fR (using the -matching rules of \fBstring match\fR). +\fBparray \fIarrayName\fR ?\fIpattern\fR? +Prints on standard output the names and values of all the elements in the +array \fIarrayName\fR, or just the names that match \fIpattern\fR (using the +matching rules of \fBstring match\fR) and their values if \fIpattern\fR is +given. \fBArrayName\fR must be an array accessible to the caller of \fBparray\fR. It may be either local or global. .TP -- cgit v0.12 From 0a6732bf275cd138134950549e2f4305e5fa5eed Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 21 Sep 2015 17:14:52 +0000 Subject: [d7ea9f9853] Contributed patch from tgl with Postgres. --- generic/regcomp.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/generic/regcomp.c b/generic/regcomp.c index d23076b..b1c02d8 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -593,13 +593,15 @@ makesearch( break; } } + + /* + * We want to mark states as being in the list already by having non + * NULL tmp fields, but we can't just store the old slist value in tmp + * because that doesn't work for the first such state. Instead, the + * first list entry gets its own address in tmp. + */ if (b != NULL && s->tmp == NULL) { - /* - * Must be split if not already in the list (fixes bugs 505048, - * 230589, 840258, 504785). - */ - - s->tmp = slist; + s->tmp = (slist != NULL) ? slist : s; slist = s; } } @@ -620,7 +622,7 @@ makesearch( freearc(nfa, a); } } - s2 = s->tmp; + s2 = (s->tmp != s) ? s->tmp : NULL; s->tmp = NULL; /* clean up while we're at it */ } } -- cgit v0.12 From e4bb6f372f554b29e021e1ab90f875e27479f4a3 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 21 Sep 2015 17:29:22 +0000 Subject: [a3c3508599] Fix typo that reversed test sense in prior fix for [3610026]. --- generic/regc_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/regc_color.c b/generic/regc_color.c index 58de004..35e7904 100644 --- a/generic/regc_color.c +++ b/generic/regc_color.c @@ -259,7 +259,7 @@ newcolor( return COLORLESS; /* too many colors */ } n = cm->ncds * 2; - if (n < MAX_COLOR + 1) { + if (n > MAX_COLOR + 1) { n = MAX_COLOR + 1; } if (cm->cd == cm->cdspace) { -- cgit v0.12 From 58cebf8eebe511c29bb83d3d64ee229d2e72b594 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 23 Sep 2015 09:40:46 +0000 Subject: WIP --- generic/tclIO.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 564df27..d4db7ec 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -113,11 +113,32 @@ typedef struct CopyState { Tcl_WideInt total; /* Total bytes transferred (written). */ Tcl_Interp *interp; /* Interp that started the copy. */ Tcl_Obj *cmdPtr; /* Command to be invoked at completion. */ + int refCount; /* Claim count on the struct */ int bufSize; /* Size of appended buffer. */ char buffer[1]; /* Copy buffer, this must be the last * field. */ } CopyState; +static void +PreserveCopyState( + CopyState *csPtr) +{ + csPtr->refCount++; +fprintf(stdout, "PRESERVE -> %d %p\n", csPtr->refCount, csPtr); fflush(stdout); +} + +static void +ReleaseCopyState( + CopyState *csPtr) +{ +fprintf(stdout, "%d -> RELEASE %p\n", csPtr->refCount, csPtr); fflush(stdout); + if (--csPtr->refCount) { + return; + } +fprintf(stdout, "FREE %p\n", csPtr); fflush(stdout); + ckfree((char *) csPtr); +} + /* * All static variables used in this file are collected into a single instance * of the following structure. For multi-threaded implementations, there is @@ -8642,9 +8663,12 @@ TclCopyChannel( Tcl_IncrRefCount(cmdPtr); } csPtr->cmdPtr = cmdPtr; + csPtr->refCount = 1; inStatePtr->csPtrR = csPtr; + PreserveCopyState(csPtr); outStatePtr->csPtrW = csPtr; + PreserveCopyState(csPtr); /* * Special handling of -size 0 async transfers, so that the -command is @@ -8696,6 +8720,9 @@ CopyData( /* Encoding control */ int underflow; /* Input underflow */ +fprintf(stdout, "CD: %p\n", csPtr); fflush(stdout); + PreserveCopyState(csPtr); + inChan = (Tcl_Channel) csPtr->readPtr; outChan = (Tcl_Channel) csPtr->writePtr; inStatePtr = csPtr->readPtr->state; @@ -8807,6 +8834,8 @@ CopyData( TclDecrRefCount(bufObj); bufObj = NULL; } +fprintf(stdout, "ECD 1: %p\n", csPtr); fflush(stdout); + ReleaseCopyState(csPtr); return TCL_OK; } } @@ -8898,6 +8927,8 @@ CopyData( TclDecrRefCount(bufObj); bufObj = NULL; } +fprintf(stdout, "ECD 2: %p\n", csPtr); fflush(stdout); + ReleaseCopyState(csPtr); return TCL_OK; } @@ -8920,6 +8951,8 @@ CopyData( TclDecrRefCount(bufObj); bufObj = NULL; } +fprintf(stdout, "ECD 3: %p\n", csPtr); fflush(stdout); + ReleaseCopyState(csPtr); return TCL_OK; } } /* while */ @@ -8971,6 +9004,8 @@ CopyData( } } } +fprintf(stdout, "ECD 4: %p\n", csPtr); fflush(stdout); + ReleaseCopyState(csPtr); return result; } @@ -9253,6 +9288,7 @@ StopCopy( return; } +fprintf(stdout, "SC: %p\n", csPtr); fflush(stdout); inStatePtr = csPtr->readPtr->state; outStatePtr = csPtr->writePtr->state; @@ -9285,9 +9321,17 @@ StopCopy( } TclDecrRefCount(csPtr->cmdPtr); } - inStatePtr->csPtrR = NULL; - outStatePtr->csPtrW = NULL; - ckfree((char *) csPtr); + if (inStatePtr->csPtrR) { + ReleaseCopyState(inStatePtr->csPtrR); + inStatePtr->csPtrR = NULL; + } + if (outStatePtr->csPtrW) { + ReleaseCopyState(outStatePtr->csPtrW); + outStatePtr->csPtrW = NULL; + } + ReleaseCopyState(csPtr); +// ckfree((char *) csPtr); +fprintf(stdout, "ESC: %p\n", csPtr); fflush(stdout); } /* -- cgit v0.12 From 55cb367ecb24a49e0fe76b104f6fe709672b066b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 23 Sep 2015 13:18:32 +0000 Subject: CopyData() now tolerates recursion enough so that io-53.18 does not segfault. --- generic/tclIO.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index d4db7ec..27eee5a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -124,18 +124,15 @@ PreserveCopyState( CopyState *csPtr) { csPtr->refCount++; -fprintf(stdout, "PRESERVE -> %d %p\n", csPtr->refCount, csPtr); fflush(stdout); } static void ReleaseCopyState( CopyState *csPtr) { -fprintf(stdout, "%d -> RELEASE %p\n", csPtr->refCount, csPtr); fflush(stdout); if (--csPtr->refCount) { return; } -fprintf(stdout, "FREE %p\n", csPtr); fflush(stdout); ckfree((char *) csPtr); } @@ -8720,7 +8717,6 @@ CopyData( /* Encoding control */ int underflow; /* Input underflow */ -fprintf(stdout, "CD: %p\n", csPtr); fflush(stdout); PreserveCopyState(csPtr); inChan = (Tcl_Channel) csPtr->readPtr; @@ -8834,7 +8830,6 @@ fprintf(stdout, "CD: %p\n", csPtr); fflush(stdout); TclDecrRefCount(bufObj); bufObj = NULL; } -fprintf(stdout, "ECD 1: %p\n", csPtr); fflush(stdout); ReleaseCopyState(csPtr); return TCL_OK; } @@ -8927,7 +8922,6 @@ fprintf(stdout, "ECD 1: %p\n", csPtr); fflush(stdout); TclDecrRefCount(bufObj); bufObj = NULL; } -fprintf(stdout, "ECD 2: %p\n", csPtr); fflush(stdout); ReleaseCopyState(csPtr); return TCL_OK; } @@ -8951,7 +8945,6 @@ fprintf(stdout, "ECD 2: %p\n", csPtr); fflush(stdout); TclDecrRefCount(bufObj); bufObj = NULL; } -fprintf(stdout, "ECD 3: %p\n", csPtr); fflush(stdout); ReleaseCopyState(csPtr); return TCL_OK; } @@ -8968,15 +8961,14 @@ fprintf(stdout, "ECD 3: %p\n", csPtr); fflush(stdout); */ total = csPtr->total; - if (cmdPtr && interp) { + if (cmdPtr && interp && csPtr->cmdPtr) { int code; /* * Get a private copy of the command so we can mutate it by adding * arguments. Note that StopCopy frees our saved reference to the * original command obj. */ - - cmdPtr = Tcl_DuplicateObj(cmdPtr); + cmdPtr = Tcl_DuplicateObj(csPtr->cmdPtr); Tcl_IncrRefCount(cmdPtr); StopCopy(csPtr); Tcl_Preserve(interp); @@ -9004,7 +8996,6 @@ fprintf(stdout, "ECD 3: %p\n", csPtr); fflush(stdout); } } } -fprintf(stdout, "ECD 4: %p\n", csPtr); fflush(stdout); ReleaseCopyState(csPtr); return result; } @@ -9288,7 +9279,6 @@ StopCopy( return; } -fprintf(stdout, "SC: %p\n", csPtr); fflush(stdout); inStatePtr = csPtr->readPtr->state; outStatePtr = csPtr->writePtr->state; @@ -9320,18 +9310,16 @@ fprintf(stdout, "SC: %p\n", csPtr); fflush(stdout); CopyEventProc, csPtr); } TclDecrRefCount(csPtr->cmdPtr); + csPtr->cmdPtr = NULL; } - if (inStatePtr->csPtrR) { - ReleaseCopyState(inStatePtr->csPtrR); - inStatePtr->csPtrR = NULL; - } - if (outStatePtr->csPtrW) { - ReleaseCopyState(outStatePtr->csPtrW); - outStatePtr->csPtrW = NULL; + if (inStatePtr->csPtrR == NULL) { + return; } + ReleaseCopyState(inStatePtr->csPtrR); + inStatePtr->csPtrR = NULL; + ReleaseCopyState(outStatePtr->csPtrW); + outStatePtr->csPtrW = NULL; ReleaseCopyState(csPtr); -// ckfree((char *) csPtr); -fprintf(stdout, "ESC: %p\n", csPtr); fflush(stdout); } /* -- cgit v0.12 From 4fb1c76abea23369b4d961e2b20f900dd0294e82 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 23 Sep 2015 16:00:57 +0000 Subject: Protect CopyState buffer from conflicting uses when CopyData() is called recursively. Also, have ReflectWatch() always give driver a chance to act. --- generic/tclIO.c | 7 +++++++ generic/tclIORChan.c | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 27eee5a..09b2537 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -114,6 +114,7 @@ typedef struct CopyState { Tcl_Interp *interp; /* Interp that started the copy. */ Tcl_Obj *cmdPtr; /* Command to be invoked at completion. */ int refCount; /* Claim count on the struct */ + int bufInUse; /* Flag to govern access to buffer */ int bufSize; /* Size of appended buffer. */ char buffer[1]; /* Copy buffer, this must be the last * field. */ @@ -8661,6 +8662,7 @@ TclCopyChannel( } csPtr->cmdPtr = cmdPtr; csPtr->refCount = 1; + csPtr->bufInUse = 0; inStatePtr->csPtrR = csPtr; PreserveCopyState(csPtr); @@ -8717,6 +8719,9 @@ CopyData( /* Encoding control */ int underflow; /* Input underflow */ + if (csPtr->bufInUse) { + return TCL_OK; + } PreserveCopyState(csPtr); inChan = (Tcl_Channel) csPtr->readPtr; @@ -8780,6 +8785,7 @@ CopyData( sizeb = csPtr->toRead; } + csPtr->bufInUse = 1; if (inBinary || sameEncoding) { size = DoRead(inStatePtr->topChanPtr, csPtr->buffer, sizeb); } else { @@ -8851,6 +8857,7 @@ CopyData( } else { sizeb = WriteChars(outStatePtr->topChanPtr, buffer, sizeb); } + csPtr->bufInUse = 0; /* * [Bug 2895565]. At this point 'size' still contains the number of diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index bbb5b88..2e5fa45 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -1508,14 +1508,6 @@ ReflectWatch( mask &= rcPtr->mode; - if (mask == rcPtr->interest) { - /* - * Same old, same old, why should we do something? - */ - - return; - } - rcPtr->interest = mask; /* -- cgit v0.12 From 261ff342b1e18433e104577ad6f8dc7c50f9292a Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 23 Sep 2015 16:08:30 +0000 Subject: Update tests to account for changed ReflectWatch behavior. --- tests/ioCmd.test | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 5a76d48..e2a6d84 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -981,7 +981,7 @@ test iocmd-23.1 {chan read, regular data return} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} {read rc* 4096} snarfsnarf} +} -result {{read rc* 4096} {read rc* 4096} {watch rc* {}} snarfsnarf} test iocmd-23.2 {chan read, bad data return, to much} -match glob -body { set res {} proc foo {args} { @@ -993,7 +993,7 @@ test iocmd-23.2 {chan read, bad data return, to much} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} 1 {read delivered more than requested}} +} -result {{read rc* 4096} {watch rc* {}} 1 {read delivered more than requested}} test iocmd-23.3 {chan read, for non-readable channel} -match glob -body { set res {} proc foo {args} { @@ -1016,7 +1016,7 @@ test iocmd-23.4 {chan read, error return} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} 1 BOOM!} +} -result {{read rc* 4096} {watch rc* {}} 1 BOOM!} test iocmd-23.5 {chan read, break return is error} -match glob -body { set res {} proc foo {args} { @@ -1028,7 +1028,7 @@ test iocmd-23.5 {chan read, break return is error} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} 1 *bad code*} +} -result {{read rc* 4096} {watch rc* {}} 1 *bad code*} test iocmd-23.6 {chan read, continue return is error} -match glob -body { set res {} proc foo {args} { @@ -1040,7 +1040,7 @@ test iocmd-23.6 {chan read, continue return is error} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} 1 *bad code*} +} -result {{read rc* 4096} {watch rc* {}} 1 *bad code*} test iocmd-23.7 {chan read, custom return is error} -match glob -body { set res {} proc foo {args} { @@ -1052,7 +1052,7 @@ test iocmd-23.7 {chan read, custom return is error} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} 1 *bad code*} +} -result {{read rc* 4096} {watch rc* {}} 1 *bad code*} test iocmd-23.8 {chan read, level is squashed} -match glob -body { set res {} proc foo {args} { @@ -1064,7 +1064,7 @@ test iocmd-23.8 {chan read, level is squashed} -match glob -body { close $c rename foo {} set res -} -result {{read rc* 4096} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} +} -result {{read rc* 4096} {watch rc* {}} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} test iocmd-23.9 {chan read, no data means eof} -match glob -setup { set res {} proc foo {args} { @@ -1080,7 +1080,7 @@ test iocmd-23.9 {chan read, no data means eof} -match glob -setup { close $c rename foo {} unset res -} -result {{read rc* 4096} {} 1} +} -result {{read rc* 4096} {watch rc* {}} {} 1} test iocmd-23.10 {chan read, EAGAIN means no data, yet no eof either} -match glob -setup { set res {} proc foo {args} { @@ -1096,7 +1096,7 @@ test iocmd-23.10 {chan read, EAGAIN means no data, yet no eof either} -match glo close $c rename foo {} unset res -} -result {{read rc* 4096} {} 0} +} -result {{read rc* 4096} {watch rc* {}} {} 0} test iocmd-23.11 {chan read, close pulls the rug out} -match glob -body { set res {} proc foo {args} { @@ -1410,14 +1410,14 @@ test iocmd-25.10 {chan configure, cgetall, level is ignored} -match glob -body { test iocmd-26.1 {chan configure, set standard option} -match glob -body { set res {} proc foo {args} { - oninit configure; onfinal; track; note MUST_NOT_HAPPEN; return + oninit configure; onfinal; track; return } set c [chan create {r w} foo] note [fconfigure $c -translation lf] close $c rename foo {} set res -} -result {{}} +} -result {{watch rc* {}} {}} test iocmd-26.2 {chan configure, set option, error return} -match glob -body { set res {} proc foo {args} { @@ -1955,7 +1955,7 @@ test iocmd-31.6 {chan postevent, posted events do happen} -match glob -body { close $c rename foo {} set res -} -result {{watch rc* read} {} TOCK {} {watch rc* {}}} +} -result {{watch rc* read} {} TOCK {watch rc* read} {} {watch rc* {}}} test iocmd-31.7 {chan postevent, posted events do happen} -match glob -body { set res {} proc foo {args} {oninit; onfinal; track; return} @@ -1968,7 +1968,7 @@ test iocmd-31.7 {chan postevent, posted events do happen} -match glob -body { close $c rename foo {} set res -} -result {{watch rc* write} {} TOCK {} {watch rc* {}}} +} -result {{watch rc* write} {} TOCK {watch rc* write} {} {watch rc* {}}} test iocmd-31.8 {chan postevent after close throws error} -match glob -setup { proc foo {args} {oninit; onfinal; track; return} proc dummy args { return } -- cgit v0.12