You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix up some potential memory leaks in fwrite (#6757)
* More careful about free() before any STOP(), #ifndef location
* Also don't assign mystream unless is_gzip
* missing nocov ends
* zstreams on stack, no more thread_streams on heap
* back to !BUFF style of alloc checking
* Avoid the leak on zero-row fwrite
* Avoid memory leak on error path
This isn't covered by the tests, but manually failing this allocation in
vgdb results in a leak otherwise:
268,096 (5,952 direct, 262,144 indirect) bytes in 1 blocks are definitely lost
in loss record 1,574 of 1,601
at 0x48407B4: malloc (vg_replace_malloc.c:381)
by 0x74ACD86: deflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.13)
by 0x90EA5232: init_stream (fwrite.c:576)
by 0x90EA5EB0: fwriteMain (fwrite.c:806)
by 0x90EA79EE: fwriteR (fwriteR.c:310)
* Typo, translate
Co-authored-by: aitap <[email protected]>
* more translations of DTPRINT
* Skip redundant 'else'
* new cite in NEWS
---------
Co-authored-by: Philippe Chataignon <[email protected]>
Co-authored-by: Ivan K <[email protected]>
Copy file name to clipboardExpand all lines: NEWS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ rowwiseDT(
69
69
70
70
6.`fread()`gains`logicalYN`argumenttoreadcolumnsconsistingonlyofstrings`Y`, `N`as `logical` (asopposedtocharacter), [#4563](https://github.com/Rdatatable/data.table/issues/4563). The default is controlled by option `datatable.logicalYN`, itself defaulting to `FALSE`, for back-compatibility -- some smaller tables (especially sharded tables) might inadvertently read a "true" string column as `logical` and cause bugs. This is particularly important for tables with a column named `y` or `n` -- automatic header detection under `logicalYN=TRUE` will see these values in the first row as being "data" as opposed to column names. A parallel option was not included for `fwrite()` at this time -- users looking for a compact representation of logical columns can still use `fwrite(logical01=TRUE)`. We also opted for now to check only `Y`, `N` and not `Yes`/`No`/`YES`/`NO`.
71
71
72
-
7.`fwrite()`with`compress="gzip"`producescompatiblegzfileswhencomposedofmultipleindependentchunksowingtoparallelization, [#6356](https://github.com/Rdatatable/data.table/issues/6356). Earlier `fwrite()` versions could have issues with HTTP upload using `Content-Encoding: gzip` and `Transfer-Encoding: chunked`. Thanks to @oliverfoster for report and @philippechataignon for the fix.
72
+
7.`fwrite()`with`compress="gzip"`producescompatiblegzfileswhencomposedofmultipleindependentchunksowingtoparallelization, [#6356](https://github.com/Rdatatable/data.table/issues/6356). Earlier `fwrite()` versions could have issues with HTTP upload using `Content-Encoding: gzip` and `Transfer-Encoding: chunked`. Thanks to @oliverfoster for report and @philippechataignon for the fix. Thanks also @aitap for pre-release testing that found some possible memory leaks in the initial fix.
73
73
74
74
8.`fwrite()`gainsanewparameter`compressLevel`tocontrolcompressionlevelforgzip, [#5506](https://github.com/Rdatatable/data.table/issues/5506). This parameter balances compression speed and total compression, and corresponds directly to the analogous command-line parameter, e.g. `compressLevel=4` corresponds to passing `-4`; the default, `6`, matches the command-line default, i.e. equivalent to passing `-6`. Thanks @mgarbuzov for the request and @philippechataignon for implementing.
0 commit comments