Skip to content

Instantly share code, notes, and snippets.

@lambday
Last active December 18, 2015 15:29
Show Gist options
  • Save lambday/5804469 to your computer and use it in GitHub Desktop.
Save lambday/5804469 to your computer and use it in GitHub Desktop.
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2013 Soumyajit De
*/
#include <shogun/lib/common.h>
#include <shogun/base/SGObject.h>
using namespace shogun;
int main(int argc, char **argv)
{
init_shogun_with_defaults();
sg_io->set_loglevel(MSG_GCDEBUG);
//sg_io->set_loglevel(MSG_DEBUG);
exit_shogun();
return 0;
}
cfdvs@cfdvs4-2 shogun]$ valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./a.out
==22625== Memcheck, a memory error detector
==22625== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==22625== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info
==22625== Command: ./a.out
==22625==
==22625== Conditional jump or move depends on uninitialised value(s)
==22625== at 0x325084C45B: vfprintf (in /lib64/libc-2.14.90.so)
==22625== by 0x3250876851: vsnprintf (in /lib64/libc-2.14.90.so)
==22625== by 0x53AC929: shogun::SGIO::message(shogun::EMessageType, char const*, char const*, int, char const*, ...) const (SGIO.cpp:93)
==22625== by 0x57CFE7C: shogun::CSGObject::unref() (SGObject.cpp:173)
==22625== by 0x5801828: shogun::exit_shogun() (init.cpp:102)
==22625== by 0x40132D: main (main.cpp:47)
==22625== Uninitialised value was created by a stack allocation
==22625== at 0x4F39090: ??? (in /usr/local/lib/libshogun.so.14.0)
==22625==
==22625== Use of uninitialised value of size 8
==22625== at 0x325084781B: _itoa_word (in /lib64/libc-2.14.90.so)
==22625== by 0x325084AC70: vfprintf (in /lib64/libc-2.14.90.so)
==22625== by 0x3250876851: vsnprintf (in /lib64/libc-2.14.90.so)
==22625== by 0x53AC929: shogun::SGIO::message(shogun::EMessageType, char const*, char const*, int, char const*, ...) const (SGIO.cpp:93)
==22625== by 0x57CFE7C: shogun::CSGObject::unref() (SGObject.cpp:173)
==22625== by 0x5801828: shogun::exit_shogun() (init.cpp:102)
==22625== by 0x40132D: main (main.cpp:47)
==22625== Uninitialised value was created by a stack allocation
==22625== at 0x4F39090: ??? (in /usr/local/lib/libshogun.so.14.0)
==22625==
==22625== Conditional jump or move depends on uninitialised value(s)
==22625== at 0x3250847825: _itoa_word (in /lib64/libc-2.14.90.so)
==22625== by 0x325084AC70: vfprintf (in /lib64/libc-2.14.90.so)
==22625== by 0x3250876851: vsnprintf (in /lib64/libc-2.14.90.so)
==22625== by 0x53AC929: shogun::SGIO::message(shogun::EMessageType, char const*, char const*, int, char const*, ...) const (SGIO.cpp:93)
==22625== by 0x57CFE7C: shogun::CSGObject::unref() (SGObject.cpp:173)
==22625== by 0x5801828: shogun::exit_shogun() (init.cpp:102)
==22625== by 0x40132D: main (main.cpp:47)
==22625== Uninitialised value was created by a stack allocation
==22625== at 0x4F39090: ??? (in /usr/local/lib/libshogun.so.14.0)
==22625==
==22625==
==22625== HEAP SUMMARY:
==22625== in use at exit: 0 bytes in 0 blocks
==22625== total heap usage: 226 allocs, 226 frees, 38,030 bytes allocated
==22625==
==22625== All heap blocks were freed -- no leaks are possible
==22625==
==22625== For counts of detected and suppressed errors, rerun with: -v
==22625== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment