dbcaStats() segfaults on disconnected CA links

Bug #1394212 reported by Ralph Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
High
Ralph Lange

Bug Description

Reported by Sangwon Yun <email address hidden>:

I faced a segmentation fault from the dbcaStats() function.

The error is happening when link is invalid as below:
record(calc, "$(CBS)SYSM:$(CTRLTYPE)$(IDX)-TEST") {
  field(INPA, "$(CBS)SYSM:$(CTRLTYPE)$(IDX)-TEST1") // non-existing PV
  ...

The error disappeared after adding a check for chid of link as:

    if (pca && ca_state(pca->chid) == cs_conn) {
->
    if (pca && pca->chid && ca_state(pca->chid) == cs_conn) {

Tags: db
Revision history for this message
Ralph Lange (ralph-lange) wrote :

Fixed in revision 12607

Changed in epics-base:
status: New → Fix Committed
Andrew Johnson (anj)
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.