Opened 4 years ago

Closed 3 years ago

#277 closed defect (fixed)

mbuild gets null_pointer_exception when segments with unknown suffixes are encountered

Reported by: Eric Swenson Owned by: Gary Dixon
Priority: major Milestone: MR12.8
Component: Tools Version: MR12.7
Keywords: Cc:

Description

I tried to use mbuild to build bound_sipb_maint_, which includes in the source, a .gdt segment. Mbuild doesn't know how to process these, but it shouldn't get a null_pointer_exception when it encounters this.

It also is too verbose when it can't find the library for a new source. See the output below:

mbuild:  az
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(Bound_obj) bound_sipb_maint_ in Multics Library: UNKNOWN
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) archive_entries.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) assoc.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) calc_costs.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) center.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) clean_up.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) convert_radix.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) decimal_to_octal.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) fixed_to_english_.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) frequency_plot_.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) get_object_info.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) graphic_print.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) member.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) nbranches.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) next_time.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) number_queued.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) print_string.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) push_wdir.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) repeat.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) ring.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) set_tty_plot.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Invalid argument. mbuild_library_$locate_Seg(source) short_resource_usage.pl1 in Multics Library: UNKNOWN.source
mbuild (analyze): Cannot build segment with unknown suffix. Ignoring Seg: tty_plot.gdt

Error:  Attempt by mbuild_analyze_$analyze_request|4662
(>system_library_tools>bound_mbuild_)
to reference through null pointer

GHM 17:52 6.573 3 level 2 Swenson

Change History (5)

comment:1 by Eric Swenson, 4 years ago

Version: MR12.7MR12.8

comment:2 by Gary Dixon, 4 years ago

mbuild_analyze_.pl1 lines 623-626 receive a null pointer from mbuild_data_$get_Seg due to the preceding error message:

mbuild (analyze): Cannot build segment with unknown suffix. Ignoring Seg: tty_plot.gdt

This message is actually generated by mbuild_data_$get_Seg just before it returns the null pointer in line 623.

623    srcP = mbuild_data_$get_Seg (addr(bld), unknown_type, comps(compI), ASarch.library, "ADD", ASarch.name);
                                                            /*    Let $get_Seg fill in the Seg(type) value.           */

626    call Tlist_add_to_tail (addr(bld.source_Tb), addr(src), addr(src.pdm_Td));

The null_pointer fault occurs in line 626.

In fact, all calls to mbuild_data_$get_Seg must be ready to get a null pointer. So this bug may be affect other segments besides source segs having an unsupported segment suffix (unknown compiler paradigm).

comment:3 by Gary Dixon, 4 years ago

Status: newaccepted

MCR10014 will correct this problem.

comment:4 by Eric Swenson, 4 years ago

Milestone: MR12.7

That was actually fixed by MCR10114, not MCR10014.

This was fixed with MR12.8-1026

comment:5 by Eric Swenson, 3 years ago

Milestone: MR12.7MR12.8
Resolution: fixed
Status: acceptedclosed
Version: MR12.8MR12.7
Note: See TracTickets for help on using tickets.