Skip to content

Valgrind errors when running batch_rl #71

@sofian

Description

@sofian

When running batch_rl I get a bunch of "Conditional jump or move depends on uninitialised value(s)" errors that come from a stack allocation at BatchRLTrainer::_doTrainEpisode(DataSet*). They might be linked to an uninitialized value in the DataSet that is passed as an argument to _doTrainEpisode.

==30259== Memcheck, a memory error detector
==30259== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==30259== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==30259== Command: ./build/computer/batch_rl -iter 1 training_set.txt 5 1 2
==30259== 
==30259== Conditional jump or move depends on uninitialised value(s)
==30259==    at 0x403778: float min<float>(float, float) (in /home/tats/Documents/workspace/qualia/examples/batch_rl/build/computer/batch_rl)
==30259==    by 0x403479: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:63)
==30259==    by 0x404DB0: DataSetTrainer::trainEpisode(DataSet*) (DataSetTrainer.cpp:45)
==30259==    by 0x404D09: DataSetTrainer::train(DataSet*, int) (DataSetTrainer.cpp:38)
==30259==    by 0x401C37: main (batch_rl.cpp:155)
==30259==  Uninitialised value was created by a stack allocation
==30259==    at 0x403332: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:41)
==30259== 
==30259== Conditional jump or move depends on uninitialised value(s)
==30259==    at 0x4037A3: float max<float>(float, float) (in /home/tats/Documents/workspace/qualia/examples/batch_rl/build/computer/batch_rl)
==30259==    by 0x4034B3: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:64)
==30259==    by 0x404DB0: DataSetTrainer::trainEpisode(DataSet*) (DataSetTrainer.cpp:45)
==30259==    by 0x404D09: DataSetTrainer::train(DataSet*, int) (DataSetTrainer.cpp:38)
==30259==    by 0x401C37: main (batch_rl.cpp:155)
==30259==  Uninitialised value was created by a stack allocation
==30259==    at 0x403332: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:41)
==30259== 
==30259== Conditional jump or move depends on uninitialised value(s)
==30259==    at 0x4E91845: __ieee754_exp_avx (e_exp.c:70)
==30259==    by 0x4E5A641: exp (w_exp.c:26)
==30259==    by 0x405DE2: NeuralNetwork::_propagateLayer(NeuralNetwork::Layer&, NeuralNetwork::Layer&) (NeuralNetwork.cpp:194)
==30259==    by 0x405AE4: NeuralNetwork::propagate() (NeuralNetwork.cpp:105)
==30259==    by 0x403BF1: QFunction::getValue(Observation const*, Action const*) (QFunction.cpp:53)
==30259==    by 0x40360F: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:97)
==30259==    by 0x404DB0: DataSetTrainer::trainEpisode(DataSet*) (DataSetTrainer.cpp:45)
==30259==    by 0x404D09: DataSetTrainer::train(DataSet*, int) (DataSetTrainer.cpp:38)
==30259==    by 0x401C37: main (batch_rl.cpp:155)
==30259==  Uninitialised value was created by a stack allocation
==30259==    at 0x403332: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:41)
==30259== 

...

==30259== Use of uninitialised value of size 8
==30259==    at 0x4E9191A: __ieee754_exp_avx (e_exp.c:91)
==30259==    by 0x4E5A641: exp (w_exp.c:26)
==30259==    by 0x405DE2: NeuralNetwork::_propagateLayer(NeuralNetwork::Layer&, NeuralNetwork::Layer&) (NeuralNetwork.cpp:194)
==30259==    by 0x405AE4: NeuralNetwork::propagate() (NeuralNetwork.cpp:105)
==30259==    by 0x403BF1: QFunction::getValue(Observation const*, Action const*) (QFunction.cpp:53)
==30259==    by 0x40360F: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:97)
==30259==    by 0x404DB0: DataSetTrainer::trainEpisode(DataSet*) (DataSetTrainer.cpp:45)
==30259==    by 0x404D09: DataSetTrainer::train(DataSet*, int) (DataSetTrainer.cpp:38)
==30259==    by 0x401C37: main (batch_rl.cpp:155)
==30259==  Uninitialised value was created by a stack allocation
==30259==    at 0x403332: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:41)
==30259== 

...

==30259== 
==30259== Conditional jump or move depends on uninitialised value(s)
==30259==    at 0x56A1FA7: __printf_fp (printf_fp.c:982)
==30259==    by 0x56A0B4B: vfprintf (vfprintf.c:1654)
==30259==    by 0x56C3AA3: vsprintf (iovsprintf.c:42)
==30259==    by 0x40309F: Q_MESSAGE(char const*, ...) (error.cpp:127)
==30259==    by 0x4036E6: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:112)
==30259==    by 0x404DB0: DataSetTrainer::trainEpisode(DataSet*) (DataSetTrainer.cpp:45)
==30259==    by 0x404D09: DataSetTrainer::train(DataSet*, int) (DataSetTrainer.cpp:38)
==30259==    by 0x401C37: main (batch_rl.cpp:155)
==30259==  Uninitialised value was created by a stack allocation
==30259==    at 0x403332: BatchRLTrainer::_doTrainEpisode(DataSet*) (BatchRLTrainer.cpp:41)
==30259== 

...

==30259== 
==30259== 
==30259== HEAP SUMMARY:
==30259==     in use at exit: 20 bytes in 3 blocks
==30259==   total heap usage: 234 allocs, 231 frees, 889,788 bytes allocated
==30259== 
==30259== LEAK SUMMARY:
==30259==    definitely lost: 20 bytes in 3 blocks
==30259==    indirectly lost: 0 bytes in 0 blocks
==30259==      possibly lost: 0 bytes in 0 blocks
==30259==    still reachable: 0 bytes in 0 blocks
==30259==         suppressed: 0 bytes in 0 blocks
==30259== Rerun with --leak-check=full to see details of leaked memory
==30259== 
==30259== For counts of detected and suppressed errors, rerun with: -v
==30259== ERROR SUMMARY: 901525 errors from 155 contexts (suppressed: 2 from 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions