Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 11, 2017
Merged

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

merged 1 commit into from
May 11, 2017

Conversation

mllg
Copy link
Contributor

@mllg mllg commented Mar 24, 2017

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
Copy link

codecov-io commented Mar 24, 2017

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