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)
Change History (9)
by , 20 years ago
| Attachment: | psmodules-0.10.0-pmConfigRead_nulls.patch added |
|---|
comment:1 by , 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 , 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 , 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 , 20 years ago
| Cc: | 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 , 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 , 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:8 by , 20 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
The code has changed significantly since this bug was submitted.

patch to allow pmConfigRead() to accept NULLs