[R-pkg-devel] Package valgrind problem I can't solve: Direction?

Peter Dunn PDunn2 at usc.edu.au
Fri Nov 3 06:01:00 CET 2017


Iñaki  and all

Well, thanks for pointers to rhub.  Wonderful.  Moving things to github, but have to go home now…

So, when I download CRAN code, initialise w and lambda (which workled for Iñaki), and run

rhub::check_with_valgrind()

on the code, I get no errors (https://builder.r-hub.io/status/tweedie_2.2.5.tar.gz-c8873979fcf84b4f8a0a4d5a47175f63).


But running

R -d "valgrind  --tool=memcheck --leak-check=full --track-origins=yes" --vanilla  < tweedie-Ex.R

from the command line *still* gives me errors about “Conditional jump or move depends on uninitialised value(s)” in the subroutine smallp”.

Iñaki found no errors when w and lambda were initialised.  I find similar using rhub (no errors)… but running valgrind from the command line still throws the same errors.

What does one make of that?

Thanks for any more help.


P.

PS: Really appreciate the help. This is driving me crazy.


From: Iñaki Úcar <i.ucar86 at gmail.com>
Date: Wednesday, 1 November 2017 at 10:28 pm
To: Peter Dunn <PDunn2 at usc.edu.au>
Cc: "r-package-devel at r-project.org" <r-package-devel at r-project.org>
Subject: Re: [R-pkg-devel] Package valgrind problem I can't solve: Direction?

2017-11-01 5:56 GMT+01:00 Peter Dunn <PDunn2 at usc.edu.au>:
> Wow: Thanks again. You are going above and beyond Iñaki which I appreciate
> greatly.
>
> But same error message appears, even after fixing (both the relerr, which I
> had already attended to, and the lambda issue).

All I can say is that initialising both lambda and w (from CRAN
version) solved the issue for me. As a matter of fact, I did see
another message about uninitialised values, but the back trace was
empty (no function names, I mean), which means that the problem is
somewhere else.

> I have since initialised *every* variable in the subroutine smallp (even the
> *input* variables to some arbitrary value to try to work out what is causing
> the issue) yet the error persists. There surely cannot be any uninitialized
> variables now *every* var in the subroutine is explicitly initialised.
>
> That tells me that there is nothing I can do to remove the error. If
> everything is initialised…
>
> Frustrated… And wasting so much time!

If you set up a public repo (GitHub or similar) where everyone can see
your current code base and changes made, it would be easier to help.
It would be even easier if you check your changes using a public build
system and share the results here. I don't know whether win-builder
uses valgrind, but you can use r-hub (https://github.com/r-hub/rhub)
by Gábor Csárdi. There is a function rhub::check_with_valgrind which
requires no further explanation.

Iñaki



USC, Locked Bag 4, Maroochydore DC, Queensland, 4558 Australia.
CRICOS Provider No: 01595D
Please consider the environment before printing this email.
This email is confidential. If received in error, please delete it from your system.

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list