[SimGrid-user] Double free in surf_parse_close (surfxml_parse.c:843)

Borja Bergua borjilla at gmail.com
Mon Feb 11 15:50:33 CET 2013


Hi,

There is a double free when I read the platform from a file, and I try to
bypass the deployment. If I don't bypass the deployment and I use files for
both the platform and the deployment, then everything seems OK. It happens
both in v3.9 (stable), and in git (unstable).

==31947== Memcheck, a memory error detector
==31947== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==31947== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==31947== Command: ./grid_simulator msg_platform-cluster.xml 0 0 102400 1 1
==31947==
[0.000000] [msg_grid/INFO] Reading platform file...
[0.000000] [msg_grid/INFO] Platform file read
[0.000000] [msg_grid/INFO] Generating deployment...
[0.000000]
/home/bbergua/programas/simgrid/SimGrid-3.9/src/surf/surfxml_parse.c:815:
[surf_parse/WARNING] Bypassing the XML parser since surf_parse_open
received a NULL pointer. If it is not what you want, go fix your code.
==31947== Invalid free() / delete / delete[] / realloc()
==31947==    at 0x402706C: free (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==31947==    by 0x411522C: surf_parse_close (surfxml_parse.c:843)
==31947==    by 0x40C9756: SIMIX_launch_application (smx_deployment.c:111)
==31947==    by 0x40AA250: MSG_launch_application (msg_deployment.c:32)
==31947==    by 0x804AEDE: test_all (grid_simulator.c:202)
==31947==    by 0x804B562: main (grid_simulator.c:270)
==31947==  Address 0x43b32b0 is 0 bytes inside a block of size 25 free'd
==31947==    at 0x402706C: free (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==31947==    by 0x411522C: surf_parse_close (surfxml_parse.c:843)
==31947==    by 0x4122E46: parse_platform_file (surfxml_parseplatf.c:120)
==31947==    by 0x40CA209: SIMIX_create_environment (smx_environment.c:39)
==31947==    by 0x40AA39C: MSG_create_environment (msg_environment.c:37)
==31947==    by 0x804ADC9: test_all (grid_simulator.c:190)
==31947==    by 0x804B562: main (grid_simulator.c:270)
==31947==
[0.000000] [msg_grid/INFO] Deployment generated

Best regards,
Borja Bergua.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/simgrid-user/attachments/20130211/f87fffc5/attachment.html>


More information about the Simgrid-user mailing list