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

GaussianCheckerboard leaks #3860

Closed
vigsterkr opened this issue Jun 24, 2017 · 1 comment
Closed

GaussianCheckerboard leaks #3860

vigsterkr opened this issue Jun 24, 2017 · 1 comment

Comments

@vigsterkr
Copy link
Member

check the latest output of memcheck: http://buildbot.shogun-toolbox.org/memcheck/20170623-0120.html

<b>MLK</b> ==13454== 8,810 (208 direct, 8,602 indirect) bytes in 1 blocks are definitely lost in loss record 589 of 592
==13454==    at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334)
==13454==    by 0x836F7CC: shogun::CDenseFeatures<double>::copy_subset(shogun::SGVector<int>) (DenseFeatures.cpp:622)
==13454==    by 0x1003495: GaussianCheckerboard::GaussianCheckerboard(int, int, int) (GaussianCheckerboard.h:93)
==13454==    by 0x10038FA: LinearTestEnvironment::LinearTestEnvironment() (LinearTestEnvironment.h:49)
==13454==    by 0x1002E42: main (main_unittest.cc:74)
==13454== 
<b>MLK</b> ==13454== 8,810 (208 direct, 8,602 indirect) bytes in 1 blocks are definitely lost in loss record 590 of 592
==13454==    at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334)
==13454==    by 0x836F7CC: shogun::CDenseFeatures<double>::copy_subset(shogun::SGVector<int>) (DenseFeatures.cpp:622)
==13454==    by 0x10034DD: GaussianCheckerboard::GaussianCheckerboard(int, int, int) (GaussianCheckerboard.h:95)
==13454==    by 0x10038FA: LinearTestEnvironment::LinearTestEnvironment() (LinearTestEnvironment.h:49)
==13454==    by 0x1002E42: main (main_unittest.cc:74)
==13454== 
<b>MLK</b> ==13454== 10,810 (208 direct, 10,602 indirect) bytes in 1 blocks are definitely lost in loss record 591 of 592
==13454==    at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334)
==13454==    by 0x836F7CC: shogun::CDenseFeatures<double>::copy_subset(shogun::SGVector<int>) (DenseFeatures.cpp:622)
==13454==    by 0x1003495: GaussianCheckerboard::GaussianCheckerboard(int, int, int) (GaussianCheckerboard.h:93)
==13454==    by 0x10039CE: MutiLabelTestEnvironment::MutiLabelTestEnvironment() (MutiLabelTestEnvironment.h:49)
==13454==    by 0x1002E5F: main (main_unittest.cc:75)
==13454== 
<b>MLK</b> ==13454== 10,810 (208 direct, 10,602 indirect) bytes in 1 blocks are definitely lost in loss record 592 of 592
==13454==    at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334)
==13454==    by 0x836F7CC: shogun::CDenseFeatures<double>::copy_subset(shogun::SGVector<int>) (DenseFeatures.cpp:622)
==13454==    by 0x10034DD: GaussianCheckerboard::GaussianCheckerboard(int, int, int) (GaussianCheckerboard.h:95)
==13454==    by 0x10039CE: MutiLabelTestEnvironment::MutiLabelTestEnvironment() (MutiLabelTestEnvironment.h:49)
==13454==    by 0x1002E5F: main (main_unittest.cc:75)

and this is in case of every unit test…. this is due to the fact that copy_subset if you check already calls SG_REF on the returned CFeatures, i.e. no need for the

SG_REF(features_train)
SG_REF(features_test)

in GaussianCheckerboard::GaussianCheckerboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant