Thanks -- I filed https://svn.open-mpi.org/trac/ompi/ticket/2401 about this.

On May 2, 2010, at 11:09 PM, Christopher Samuel wrote:

> Hi there,
> 
> I've been playing around with Coccinelle, the semantic
> patching system (packaged in Ubuntu 10.04) and using it
> to try and detect things like unchecked malloc().  It's
> not perfect, for instance it flags up calls to assert()
> on the result of the malloc as bad, even though they're
> not, but the rest seem real.
> 
> I've done a test run on OMPI 1.4.2rc3r23065 and it's
> flagged the following, I hope these are useful!
> 
> 
> ompi/mca/btl/openib/btl_openib_component.c
> line 997 - prepare_device_for_use()
> 
>      init_data = malloc(sizeof(mca_btl_openib_frag_init_data_t));
> 
> 
> ompi/mca/btl/openib/btl_openib_component.c
> line 2414 - btl_openib_component_init()
> 
>       init_data = malloc(sizeof(mca_btl_openib_frag_init_data_t));
> 
> 
> ompi/mca/btl/openib/connect/btl_openib_connect_base.c
> line 104 - prepare_device_for_use()
> 
>      available = calloc(1, sizeof(all));
> 
> 
> ompi/mca/btl/portals/btl_portals.c
> line 104 - mca_btl_portals_add_procs()
> 
>       portals_procs = malloc(nprocs * sizeof(ptl_process_id_t));
> 
> 
> ompi/mpi/f77/comm_spawn_multiple_f.c
> line 109 - mpi_comm_spawn_multiple_f()
> 
>      c_info = malloc (array_size * sizeof(MPI_Info));
> 
> 
> opal/class/opal_hash_table.c
> line 431 - opal_hash_table_set_value_ptr()
> 
>      node->hn_key = malloc(key_size);
> 
> 
> orte/mca/ras/alps/ras_alps_module.c
> line 243 - orte_ras_alps_read_appinfo_file()
> 
>          cpBuf=malloc(szLen+1);              /* Allocate buffer
>         */
> 
> 
> All the best,
> Chris
> --
>   Christopher Samuel - Senior Systems Administrator
>   VLSCI - Victorian Life Sciences Computational Initiative
>   Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545
>           http://www.vlsci.unimelb.edu.au/
> 
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/

Reply via email to