Commit [6ee980]  Maximize  Restore  History

Fix Coverity errors found on May 20, 2013 git snapshot

Coverity identified the following errors on scans run from May 7 through
May 20, 2013:

Type,Category,File,Function
Wrapper object use after free,Memory - illegal accesses,/agents/jvmpi/jvmpi_oprofile.cpp,compiled_method_load(JVMPI_Event *)
Unchecked return value,Error handling issues,/daemon/opd_mangling.c,opd_open_sample_file
Dereference after null check,Null pointer dereferences,/daemon/opd_sfile.c,sfile_hash
Uninitialized scalar field,Uninitialized members,/gui/oprof_start_config.cpp,config_setting::config_setting()
Division or modulo by zero,Integer handling issues,/libdb/db_stat.c,odb_hash_stat
Resource leak,Resource leaks,/libop/op_cpu_type.c,_auxv_fetch
Resource leak,Resource leaks,/libop/op_cpu_type.c,fetch_at_hw_platform
Negative array index read,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Write to pointer after free,Memory - corruptions,/libop/op_events.c,read_events
Read from pointer after free,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Time of check time of use,Security best practices violations,/libopagent/opagent.c,op_open_agent
Improper use of negative value,Integer handling issues,/libperf_events/operf_counter.cpp,operf_record::setup()
Double free,Memory - corruptions,/libperf_events/operf_counter.cpp,operf_record::setup()
Uninitialized pointer read,Memory - illegal accesses,/libperf_events/operf_counter.cpp,<unnamed>::_get_perf_event_from_file(mmap_info &)
Unchecked return value,Error handling issues,/libperf_events/operf_mangling.cpp,"operf_open_sample_file(odb_t *, operf_sfile *, operf_sfile *, int, int)"
Using invalid iterator,API usage errors,/libperf_events/operf_process_info.cpp,operf_process_info::try_disassociate_from_parent(char *)
Non-array delete for scalars,Memory - illegal accesses,/libregex/op_regex.cpp,"<unnamed>::op_regerror(int, const re_pattern_buffer &)"
Resource leak,Resource leaks,/libutil++/op_bfd.cpp,"op_bfd::op_bfd(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const string_filter &, const extra_images &, bool &)"
Explicit null dereferenced,Null pointer dereferences,/opjitconv/create_bfd.c,fill_symtab
Resource leak,Resource leaks,/opjitconv/opjitconv.c,_cleanup_jitdumps
Use of untrusted string value,Insecure data handling,/opjitconv/opjitconv.c,main
Resource leak,Resource leaks,/pe_profiling/operf.cpp,_get_cpu_for_perf_events_cap()
Dereference null return value,Null pointer dereferences,/pe_profiling/operf.cpp,_process_session_dir()
Incorrect deallocator used,API usage errors,/pe_profiling/operf.cpp,_process_events_list()

===============================

This patch fixes those errors.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

Maynard Johnson Maynard Johnson 2013-05-28

changed agents/jvmpi/jvmpi_oprofile.cpp
changed daemon/opd_mangling.c
changed gui/oprof_start_config.cpp
changed libdb/db_stat.c
changed libop/op_cpu_type.c
changed libop/op_events.c
changed libop/op_mangle.c
changed libopagent/opagent.c
changed libperf_events/operf_counter.cpp
changed libperf_events/operf_mangling.cpp
changed libperf_events/operf_process_info.cpp
changed opjitconv/opjitconv.c
changed pe_profiling/operf.cpp
changed pp/opreport.cpp
agents/jvmpi/jvmpi_oprofile.cpp Diff Switch to side-by-side view
Loading...
daemon/opd_mangling.c Diff Switch to side-by-side view
Loading...
gui/oprof_start_config.cpp Diff Switch to side-by-side view
Loading...
libdb/db_stat.c Diff Switch to side-by-side view
Loading...
libop/op_cpu_type.c Diff Switch to side-by-side view
Loading...
libop/op_events.c Diff Switch to side-by-side view
Loading...
libop/op_mangle.c Diff Switch to side-by-side view
Loading...
libopagent/opagent.c Diff Switch to side-by-side view
Loading...
libperf_events/operf_counter.cpp Diff Switch to side-by-side view
Loading...
libperf_events/operf_mangling.cpp Diff Switch to side-by-side view
Loading...
libperf_events/operf_process_info.cpp Diff Switch to side-by-side view
Loading...
opjitconv/opjitconv.c Diff Switch to side-by-side view
Loading...
pe_profiling/operf.cpp Diff Switch to side-by-side view
Loading...
pp/opreport.cpp Diff Switch to side-by-side view
Loading...

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks