Task #75006 - added.err

back to task #75006
download
Error: GCC_ANALYZER_WARNING (CWE-457):
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c: scope_hint: In function 'linux_cpu_present_mask'
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:2645:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'is_64_bit'
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:37: included_from: Included from here.
# 2643|   		return &drgn_enomem;
# 2644|   
# 2645|-> 	if (is_64_bit) {
# 2646|   		err = drgn_program_read_memory(prog, bitmap, bitmap_addr, size * 8, false);
# 2647|   		if (err)

Error: GCC_ANALYZER_WARNING (CWE-476):
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:2664:34: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
drgn-0.0.32+249.g462de314/libdrgn/elf_file.h:24: included_from: Included from here.
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:27: included_from: Included from here.
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c: scope_hint: In function 'linux_cpu_present_mask'
drgn-0.0.32+249.g462de314/libdrgn/array.h:14: included_from: Included from here.
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:21: included_from: Included from here.
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:8: included_from: Included from here.
# 2662|   
# 2663|   		for (size_t i = 0; i < nr_words; i++) {
# 2664|-> 			uint32_t value = bswap ? bswap_32(orig[i]) : orig[i];
# 2665|   			if (i & 1)
# 2666|   				bitmap[i >> 1] |= (uint64_t) value << 32;

Error: COMPILER_WARNING (CWE-457):
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c: scope_hint: In function 'drgn_program_is_irq_regs'
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:2711:61: warning[-Wmaybe-uninitialized]: 'nr_cpus' may be used uninitialized
# 2711 |                 for (size_t word_index = 0; word_index * 64 < nr_cpus; word_index++) {
#      |                                             ~~~~~~~~~~~~~~~~^~~~~~~~~
drgn-0.0.32+249.g462de314/libdrgn/linux_kernel.c:2703:24: note: 'nr_cpus' was declared here
# 2703 |                 size_t nr_cpus;
#      |                        ^~~~~~~
# 2709|   		VECTOR(uint64_vector, addresses);
# 2710|   		uint64_t regs_ptr;
# 2711|-> 		for (size_t word_index = 0; word_index * 64 < nr_cpus; word_index++) {
# 2712|   			uint64_t word = cpumask[word_index];
# 2713|   			unsigned int i;