Skip to content

Initialize data->fn_rows in rbindlist (fixes #2019) - #2077

Merged
mattdowle merged 1 commit into
Rdatatable:masterfrom
mllg:master
May 11, 2017
Merged

mattdowle merged 1 commit into
Rdatatable:masterfrom
mllg:master

Conversation

@mllg

@mllg mllg commented Mar 24, 2017

Copy link
Copy Markdown
Contributor

data.fn_rows is initialized here:
https://github.com/Rdatatable/data.table/blob/master/src/rbindlist.c#L505

However, this loop has a conditional break, resulting in data.fn_rows[i] being undefined if not set in
https://github.com/Rdatatable/data.table/blob/master/src/rbindlist.c#L524
which again is only executed conditionally (continue in L517+L519).

This may lead to a segfault while writing values to the id column in https://github.com/Rdatatable/data.table/blob/master/src/rbindlist.c#L770
and https://github.com/Rdatatable/data.table/blob/master/src/rbindlist.c#L778.

@codecov-io

codecov-io commented Mar 24, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #2077 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2077      +/-   ##
==========================================
+ Coverage   90.58%   90.61%   +0.03%     
==========================================
  Files          58       58              
  Lines       11055    11055              
==========================================
+ Hits        10014    10018       +4     
+ Misses       1041     1037       -4
Impacted Files Coverage Δ
src/rbindlist.c 88.93% <100%> (ø) ⬆️
src/forder.c 94.47% <0%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3106c4...bb41fa9. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants