Opened 7 days ago

#1511 new defect

with debug parameters, rasdaman experiences a few extra memory leaks

Reported by: bbell Owned by: bbell
Priority: minor Milestone:
Component: undecided Version: development
Keywords: Cc: dmisev
Complexity: Medium

Description

the r_Minterval and r_Point methods ::get_string_representation() allocates memory; however, in some of the debug statements, this function is simply being called in order to output some information.

find the places in the code where this occurs and ensure that correct memory handling is applied.

example stack trace:

==6362== 3 bytes in 1 blocks are definitely lost in loss record 2 of 382
==6362==    at 0x4C27BE3: malloc (vg_replace_malloc.c:299)
==6362==    by 0xBC82889: strdup (in /usr/lib64/libc-2.17.so)
==6362==    by 0xA8DFDD: r_Minterval::get_string_representation() const (minterval.cc:903)
==6362==    by 0x900A13: NullValuesHandler::getNullValues() const (nullvalues.cc:56)
==6362==    by 0x9CEA42: QtConversion::evaluate(std::vector<QtData*, std::allocator<QtData*> >*) (qtconversion.cc:223)
==6362==    by 0x9EFAD4: QtOperationIterator::next() (qtoperationiterator.cc:253)
==6362==    by 0xA12EFC: QueryTree::evaluateRetrieval() (querytree.cc:174)
==6362==    by 0x944599: ServerComm::executeQuery(unsigned long, char const*, ExecuteQueryRes&) (servercomm2.cc:1651)
==6362==    by 0x7B2F3A: doStuff() (directql.cc:1109)
==6362==    by 0x7B3655: main (directql.cc:1176)

for the following commmand:

valgrind --leak-check=full --track-origins=yes directql -q 'select csv(concat (marray x in [ 10 : 31 , 0 : 23 ] values (c[ 2014 , 1 ,x[0],x[1], 50 , 450 , 450 ])) with (marray x in [ 1 : 28 , 0 : 23 ] values (c[ 2014 , 2 ,x[0],x[1], 50 , 450 , 450 ])) with (marray x in [ 1 : 12 , 0 : 23 ] values (c[ 2014 , 3 ,x[0],x[1], 50 , 450 , 450 ])) along 0) from MemTestData as c' --out string -d ~/projects/install/data/RASBASE

Change History (0)

Note: See TracTickets for help on using tickets.