Closed MichaelChirico closed 4 years ago
Created attachment 1235 [details] valgrind log file
The valgrind log file attached.
Created attachment 1236 [details] source code
prj.tar.gz source code and R file.
R buck tracking system is not there to track bugs in your code! It is also not there to ask others to debug your code. It is there to report bugs in R(!!) - please do read the FAQ 9.
From a cursory glance your code causes obvious buffer overflows in character vectors (you don't reserve any space for the values since you're passing 0-length strings and yet you copy into them) so you should expect crashes. You may want to consider using either .Call (if you are familiar with R) or Rcpp (if you are more familiar with C++).
Do you know anything about the free software / open source community?
Why on earth do you think that just because you are maybe an R developer can be that rude to answer a bug report? Is it that hard for you to navigate through bug reports and set their status? Do you feel something like being raped for each bug you resolve/assign/etc? If that's not the case, so why are you so angry about such a bug?
I think from the report itself it's trivial that this report wasn't my first bug report; neither my first time starting a new environment to develop.
Of course I DID read manuals that YOU provided for R extension developers. Couldn't you think even for a little moment that there might be a problem there? Do you think that you are teaching me how memory allocation works?
What I say, is simply that I read the manuals, and from the most cited provided manual, someone can not conclude such a memory allocation system that you mentioned.
The only feedback from such an answer to a bug is that the R community not only is not that helpful, but also is something that you MUST try to avoid.
Sorry guys, I really didn't mean to be rude; but that was really the best way I could clear your situation for yourselves.
Best wishes, Adrin.
I have a C/C++ code and I'm calling a function from that code using .C
I did check for memory leak in my C code using valgrind and the output of that is attached. But when I run the same code from R, I get segfault in older versions immediately. In 2.13.2 I will get an exception when I run gc() right after my R script.
Reproduction steps:
To reproduce the valgrind output of the C code itself:
g++ -m64 -I/usr/include/R -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic kbest.cpp
valgrind --leak-check=full ./a.out ../data/Signs.csv ../data/Pvals.csv 2120000000 2
METADATA