Ticket UUID: | dd260aaf7225ffcb658d0d64ba87d1c2351487e | |||
Title: | [chan configure -dictionary] (zlib deflate) segfault | |||
Type: | Bug | Version: | 8.6.5 | |
Submitter: | nem | Created on: | 2016-04-15 08:41:27 | |
Subsystem: | 57. zlib | Assigned To: | dkf | |
Priority: | 8 | Severity: | Critical | |
Status: | Closed | Last Modified: | 2016-06-27 14:29:15 | |
Resolution: | Fixed | Closed By: | dkf | |
Closed on: | 2016-06-27 14:29:15 | |||
Description: |
The following commands cause a segfault on 8.6 and 8.7a0 (Mac OS X 10.10.5): % set json {{"sub":["demo","amadmin"],"exp":"valid","auth":"http://neil.example.com:8080/openam/json/authenticate"}} {"sub":["demo","amadmin"],"exp":"valid","auth":"http://neil.example.com:8080/openam/json/authenticate"} % set out [open /tmp/test.json wb] file6 % zlib push deflate $out file6 % puts $out $json % chan configure $out -dictionary rlwrap: warning: tclsh8.7 crashed, killed by SIGSEGV. | |||
User Comments: |
dkf added on 2016-06-27 14:29:15:
Thanks! dgp added on 2016-06-20 21:52:37: Would be good to fix for 8.6.6. anonymous (claiming to be aspect) added on 2016-04-16 07:00:03: potential patch attached. I thought it might be possible to read the compression dictionary generated by zlib after pushing some data through, but looking at the TIP and zlib manual it's clear that's not intended. The patch introduces some tests, makes getting an unconfigured -dictionary work and adds some text from http://www.zlib.net/manual.html to the docs, making it cleared how the option works. Making the inflate case work correctly required removing the lines at [1] - I think this is correct but dkf might know if there's a reason to do otherwise. [1]: http://core.tcl.tk/tcl/artifact/3354467036e27f0b?ln=3623-3624 |
Attachments:
- zlib.patch [download] added by anonymous on 2016-04-16 06:58:13. [details]