IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 20 years ago

Closed 20 years ago

#706 closed defect (invalid)

pmConfigRead() has too many assertions

Reported by: jhoblitt Owned by: Paul Price
Priority: high Milestone:
Component: config Version: 0.10.0
Severity: normal Keywords:
Cc:

Description

This function has assertions that prevent it's use and disagree with it's
doxygen description.

Attachments (1)

psmodules-0.10.0-pmConfigRead_nulls.patch (775 bytes ) - added by jhoblitt 20 years ago.
patch to allow pmConfigRead() to accept NULLs

Download all attachments as: .zip

Change History (9)

by jhoblitt, 20 years ago

patch to allow pmConfigRead() to accept NULLs

comment:1 by gusciora@…, 20 years ago

I commented out those asserts for now. What should be done in the code if those
aruments are NULL?

comment:2 by jhoblitt, 20 years ago

The code already does the correct thing when passed in a pointer to a NULL
(search for the config(s)). The assertions must have been added in after the fact.

comment:3 by gusciora@…, 20 years ago

I tried NULL pointers without the ASSERTS and I received ungraceful exits in all
cases (either seg faults, or memory leaks).

comment:4 by jhoblitt, 20 years ago

Cc: price@… added

I have working code in the form:

pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE);

and I believe Paul does as well. What was leaking and/or where was the segfault
originating?

comment:5 by gusciora@…, 20 years ago

The seg faults with site=NULL was when it was written to with the
MetaDataConfigParse routine. The memory leaks with *site=NULL where numerous:
about 3 screefuls.

The seg faults with the other args were at various other places. The code in
tst_pmConfig tests all these things (though I commented it out in the current
CVS head).

comment:6 by jhoblitt, 20 years ago

OK. Lets either leave this bug open or a new one about the segfaults & leaks.
We don't want these issues to be forgotten but please put off investing any
effort in them until all of the outstanding pslib issues are resolved.

comment:7 by jhoblitt, 20 years ago

Owner: changed from gusciora@… to Paul Price

Are Georges comments still an issue?

comment:8 by Paul Price, 20 years ago

Resolution: invalid
Status: newclosed

The code has changed significantly since this bug was submitted.

Note: See TracTickets for help on using tickets.