Re: [Rd] uninitialised value in R (PR#13476)

2009-01-28 Thread Martin Schlather
Mathieu, I do not understand what you mean in your email. I am only interested in the cause of the valgrind message in > .Call("XXX") [1] 1 > nd <- 3 > solve(diag(nd) , as.vector(1:nd)) [1] 1 2 3 > .Call("XXX") ==25734== Conditional jump or move depends on uninitialised value(s) ==25734==at 0

Re: [Rd] uninitialised value in R (PR#13476)

2009-01-28 Thread Martin Schlather
Hi Mathieu, Very strange. (i) The whole package RandomFields is written with ` extern "C" ' and seems working. There is no message from valgrind anywhere, except in two situations that I have boiled down to the code in the bug report. (ii) without ` extern "C" ' I get a warning plus an

Re: [Rd] uninitialised value in R (PR#13476)

2009-01-28 Thread Mathieu Ribatet
Hi Martin, Sorry I was stupid. Indeed, I named the file tom.c instead of tmp.cc. Now with the right extension, it works with the 'extern "C"' piece of code. However, for your (ii) point, this shouldn't be related to the omission of 'extern "C"' but to the fact that the shared library is not l

Re: [Rd] uninitialised value in R (PR#13476)

2009-01-27 Thread Mathieu Ribatet
Hi Martin, I wasn't able to compile your files. Replacing "extern "C" SEXP XXX();" by "SEXP XXX();" solve the issue and I got no message from valgrind - I'm not sure this is what you really want to do though. I hope this might help. Cheers, Mathieu schlat...@math.uni-goettingen.de a écrit :

[Rd] uninitialised value in R (PR#13476)

2009-01-27 Thread schlather
Hi, I get an "Conditional jump or move depends on uninitialised value(s)" from valgrind when using 'solve' in combination with some simple C-code. (I did not use other functions of R besides 'solve'.) In detail: running R --vanilla -d "valgrind --tool=memcheck --memcheck:leak-check=yes --num-ca