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

Valgrind issues #48

Open
mdunphy opened this issue Oct 17, 2024 · 0 comments · May be fixed by #49
Open

Valgrind issues #48

mdunphy opened this issue Oct 17, 2024 · 0 comments · May be fixed by #49

Comments

@mdunphy
Copy link

mdunphy commented Oct 17, 2024

Generic Issue

  • Raven version: 3.8
  • Operating System: Ubuntu 22.04

Description

In an effort to solve issue #31, I ran the test case under valgrind to look for memory errors, and then solved /some/ of the reports. This effort did not solve #31, but having solved a few of the valgrind reports, it seems worthwhile to send the fixes here

  1. g.alb_decay_melt not initialized, looks like a copy-paste oversight, second line here should initialize g.alb_decay_melt

g.alb_decay_cold =DefaultParameterValue(is_template,true);
g.alb_decay_cold =DefaultParameterValue(is_template,true);

  1. This object p is not freed at the end of the function (minor one-time memory leak):

CParser *p=new CParser(INPUT,Options.rvp_filename,line);

  1. This also looks like a typo, should check aPCm on second line:

if (aPm!=NULL){delete [] aPm; aPm=NULL;}
if (aPm!=NULL){delete [] aPCm;aPCm=NULL;}

I think these are trivial issues -- and the main benefit of fixing them is to have fewer valgrind reports to dig through in future debugging

PR forthcoming

@mdunphy mdunphy linked a pull request Oct 17, 2024 that will close this issue
3 tasks
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 a pull request may close this issue.

1 participant