[redland-dev] [Rasqal RDF Query Library 0000573]: Memleak

Mantis Bug Tracker mantis-bug-sender at librdf.org
Tue Jun 24 10:10:37 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=573 
====================================================================== 
Reported By:                juergen.mangler
Assigned To:                
====================================================================== 
Project:                    Rasqal RDF Query Library
Issue ID:                   573
Category:                   
Reproducibility:            always
Severity:                   major
Priority:                   urgent
Status:                     new
Query Language:             None 
====================================================================== 
Date Submitted:             2014-06-24 14:10
Last Modified:              2014-06-24 14:10
====================================================================== 
Summary:                    Memleak
Description: 
#include <rasqal.h>

int main(int argc, char *argv[]) {
  rasqal_world *world;

  for (int i=0; i<20; i++) {
    world = rasqal_new_world();
    if(!world || rasqal_world_open(world)) {
      fprintf(stderr, "rasqal_world init failed\n");
      return(1);
    }
    rasqal_free_world(world);
  }
  return (0);
}

Leaks mem. Checked with valgrind.

==27809== HEAP SUMMARY:
==27809==     in use at exit: 5,393 bytes in 115 blocks
==27809==   total heap usage: 46,799 allocs, 46,684 frees, 7,157,911 bytes
allocated
==27809== 
==27809== LEAK SUMMARY:
==27809==    definitely lost: 760 bytes in 38 blocks
==27809==    indirectly lost: 0 bytes in 0 blocks
==27809==      possibly lost: 0 bytes in 0 blocks
==27809==    still reachable: 4,633 bytes in 77 blocks
==27809==         suppressed: 0 bytes in 0 blocks

Steps to Reproduce: 
1) Create file test.c from source above.
2) /usr/bin/gcc -std=c99 -I/usr/include/rasqal -I/usr/include/raptor2 test.c -o
test -lraptor2 -lrasqal
3) valgrind ./test
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-06-24 14:10 juergen.manglerNew Issue                                    
2014-06-24 14:10 juergen.manglerFile Added: test.c                           
======================================================================



More information about the redland-dev mailing list