Activity log for bug #1881563

Date Who What changed Old value New value Message
2020-06-01 10:33:44 Dirk Zimoch bug added bug
2020-06-01 11:30:08 Ralph Lange summary empty arrays have undefined bahavior Empty arrays have undefined behavior
2020-06-03 07:20:20 Dirk Zimoch description The behavior of arrays with 0 elements is inconsistent and seemingly undefined. I made the fllowing observations: 1. Reading empty arrays with caget shows NELM values, all 0 except for the first which sometimes contains strange not-quite-random numbers (see bug report 1242919). I have observed values 0, 2.122e-314, 2.50321e-308, 22, 18, 2.02038e-39, 1441792, 1179648, 3.05948e-308, also depending on the -d option (DBR type) of caget. 2. Reading empty arrays with camonitor shows no values. 3. A scalar input record reading INP or scalar output record reading DOL (with OMSL closed_loop) from an empty array (aai, aao or waveform) reliably reads the value 0 (tested with ai, bi, mbbi, mbbiDirect, longin, stringin, ao, bo, mbbo, mboDirect, longout, stringout). This is true for DB links as well as for CA, CP and CPP links. 4. An array record (aai, waveform) reading from an empty array does not change its current value. It does not change NORD, it does not clear the arrays elements, it does not show an alarm. 5. Writing 0 elements to an array with caput -a fails whith "Invalid element count requested". My opinion on this behavior is as follows: 1. Reading arrays with caget should return NORD elements, not NELM elements. But if we put this side, the additional elements should all be set to 0. For empty arrays, this includes the the first one (index 0). 2. This is correct behavior. 3. This is consistent but questionable. Converting an empy array to a scalar should fail as there is no value to convert. But that might break existing dbs. In that case this behavior should be documented. (Or is it?) 4. This behavior is buggy. The receiving record should update its NORD to 0. 5. It should be possible to write an ampty array. The behavior of arrays with 0 elements is inconsistent and seemingly undefined. I made the fllowing observations: 1. Reading empty arrays with caget shows NELM values, all 0 except for the first which sometimes contains strange not-quite-random numbers (see bug report 1242919). I have observed values 0, 2.122e-314, 2.50321e-308, 22, 18, 2.02038e-39, 1441792, 1179648, 3.05948e-308, also depending on the -d option (DBR type) of caget. 2. Reading empty arrays with camonitor shows no values. 3. A scalar input record reading INP or scalar output record reading DOL (with OMSL closed_loop) from an empty array (aai, aao or waveform) reliably reads the value 0 (tested with ai, bi, mbbi, mbbiDirect, longin, stringin, ao, bo, mbbo, mboDirect, longout, stringout). This is true for DB links as well as for CA, CP and CPP links. 4. An array record (aai, waveform) reading from an empty array does not change its current value. It does not change NORD, it does not clear the arrays elements, it does not show an alarm. 5. Writing 0 elements to an array with caput -a fails whith "Invalid element count requested". My opinion on this behavior is as follows: 1. Reading arrays with caget should return NORD elements, not NELM elements. But if we put this side, the additional elements should all be set to 0. For empty arrays, this includes the the first one (index 0). 2. This is correct behavior. 3. This is consistent but questionable. Converting an empy array to a scalar should fail as there is no value to convert. But that might break existing dbs. In that case this behavior should be documented. (Or is it?) 4. This behavior is buggy. The receiving record should update its NORD to 0. 5. It should be possible to write an empty array.
2020-06-05 16:21:11 Andrew Johnson epics-base: status New In Progress
2020-06-05 16:21:24 Andrew Johnson epics-base: assignee Dirk Zimoch (dirk.zimoch)
2020-06-05 16:21:44 Andrew Johnson nominated for series epics-base/7.0
2020-06-05 16:21:44 Andrew Johnson bug task added epics-base/7.0
2020-06-17 14:38:00 Dirk Zimoch description The behavior of arrays with 0 elements is inconsistent and seemingly undefined. I made the fllowing observations: 1. Reading empty arrays with caget shows NELM values, all 0 except for the first which sometimes contains strange not-quite-random numbers (see bug report 1242919). I have observed values 0, 2.122e-314, 2.50321e-308, 22, 18, 2.02038e-39, 1441792, 1179648, 3.05948e-308, also depending on the -d option (DBR type) of caget. 2. Reading empty arrays with camonitor shows no values. 3. A scalar input record reading INP or scalar output record reading DOL (with OMSL closed_loop) from an empty array (aai, aao or waveform) reliably reads the value 0 (tested with ai, bi, mbbi, mbbiDirect, longin, stringin, ao, bo, mbbo, mboDirect, longout, stringout). This is true for DB links as well as for CA, CP and CPP links. 4. An array record (aai, waveform) reading from an empty array does not change its current value. It does not change NORD, it does not clear the arrays elements, it does not show an alarm. 5. Writing 0 elements to an array with caput -a fails whith "Invalid element count requested". My opinion on this behavior is as follows: 1. Reading arrays with caget should return NORD elements, not NELM elements. But if we put this side, the additional elements should all be set to 0. For empty arrays, this includes the the first one (index 0). 2. This is correct behavior. 3. This is consistent but questionable. Converting an empy array to a scalar should fail as there is no value to convert. But that might break existing dbs. In that case this behavior should be documented. (Or is it?) 4. This behavior is buggy. The receiving record should update its NORD to 0. 5. It should be possible to write an empty array. The behavior of arrays with 0 elements is inconsistent and seemingly undefined. I made the fllowing observations: 1. Reading empty arrays with caget shows NELM values, all 0 except for the first which sometimes contains strange not-quite-random numbers (see bug report 1242919). I have observed values 0, 2.122e-314, 2.50321e-308, 22, 18, 2.02038e-39, 1441792, 1179648, 3.05948e-308, also depending on the -d option (DBR type) of caget. 2. Reading empty arrays with camonitor shows no values. 3. A scalar input record reading INP or scalar output record reading DOL (with OMSL closed_loop) from an empty array (aai, aao or waveform) <del>reliably reads the value 0</del> does not change its value (tested with ai, bi, mbbi, mbbiDirect, longin, stringin, ao, bo, mbbo, mboDirect, longout, stringout). This is true for DB links as well as for CA, CP and CPP links. 4. An array record (aai, waveform) reading from an empty array does not change its current value. It does not change NORD, it does not clear the arrays elements, it does not show an alarm. 5. Writing 0 elements to an array with caput -a fails whith "Invalid element count requested". My opinion on this behavior is as follows: 1. Reading arrays with caget should return NORD elements, not NELM elements. But if we put this side, the additional elements should all be set to 0. For empty arrays, this includes the the first one (index 0). 2. This is correct behavior. 3. This is consistent but questionable. Converting an empy array to a scalar should fail as there is no value to convert. But that might break existing dbs. In that case this behavior should be documented. (Or is it?) 4. This behavior is buggy. The receiving record should update its NORD to 0. 5. It should be possible to write an empty array.
2020-06-17 14:39:03 Dirk Zimoch description The behavior of arrays with 0 elements is inconsistent and seemingly undefined. I made the fllowing observations: 1. Reading empty arrays with caget shows NELM values, all 0 except for the first which sometimes contains strange not-quite-random numbers (see bug report 1242919). I have observed values 0, 2.122e-314, 2.50321e-308, 22, 18, 2.02038e-39, 1441792, 1179648, 3.05948e-308, also depending on the -d option (DBR type) of caget. 2. Reading empty arrays with camonitor shows no values. 3. A scalar input record reading INP or scalar output record reading DOL (with OMSL closed_loop) from an empty array (aai, aao or waveform) <del>reliably reads the value 0</del> does not change its value (tested with ai, bi, mbbi, mbbiDirect, longin, stringin, ao, bo, mbbo, mboDirect, longout, stringout). This is true for DB links as well as for CA, CP and CPP links. 4. An array record (aai, waveform) reading from an empty array does not change its current value. It does not change NORD, it does not clear the arrays elements, it does not show an alarm. 5. Writing 0 elements to an array with caput -a fails whith "Invalid element count requested". My opinion on this behavior is as follows: 1. Reading arrays with caget should return NORD elements, not NELM elements. But if we put this side, the additional elements should all be set to 0. For empty arrays, this includes the the first one (index 0). 2. This is correct behavior. 3. This is consistent but questionable. Converting an empy array to a scalar should fail as there is no value to convert. But that might break existing dbs. In that case this behavior should be documented. (Or is it?) 4. This behavior is buggy. The receiving record should update its NORD to 0. 5. It should be possible to write an empty array. The behavior of arrays with 0 elements is inconsistent and seemingly undefined. I made the fllowing observations: 1. Reading empty arrays with caget shows NELM values, all 0 except for the first which sometimes contains strange not-quite-random numbers (see bug report 1242919). I have observed values 0, 2.122e-314, 2.50321e-308, 22, 18, 2.02038e-39, 1441792, 1179648, 3.05948e-308, also depending on the -d option (DBR type) of caget. 2. Reading empty arrays with camonitor shows no values. 3. A scalar input record reading INP or scalar output record reading DOL (with OMSL closed_loop) from an empty array (aai, aao or waveform) does not change its value and does not show an alarm (tested with ai, bi, mbbi, mbbiDirect, longin, stringin, ao, bo, mbbo, mboDirect, longout, stringout). This is true for DB links as well as for CA, CP and CPP links. 4. An array record (aai, waveform) reading from an empty array does not change its current value. It does not change NORD, it does not clear the arrays elements, it does not show an alarm. 5. Writing 0 elements to an array with caput -a fails whith "Invalid element count requested". My opinion on this behavior is as follows: 1. Reading arrays with caget should return NORD elements, not NELM elements. But if we put this side, the additional elements should all be set to 0. For empty arrays, this includes the the first one (index 0). 2. This is correct behavior. 3. This is consistent but questionable. Converting an empy array to a scalar should fail as there is no value to convert. But that might break existing dbs. In that case this behavior should be documented. (Or is it?) 4. This behavior is buggy. The receiving record should update its NORD to 0. 5. It should be possible to write an empty array.
2020-06-29 21:04:43 Dirk Zimoch merge proposal linked https://code.launchpad.net/~dirk.zimoch/epics-base/+git/epics-base/+merge/386175
2020-12-16 18:05:24 Andrew Johnson epics-base/7.0: milestone 7.0.5
2020-12-16 18:05:28 Andrew Johnson epics-base/7.0: status In Progress Fix Committed
2021-03-01 04:22:44 Andrew Johnson epics-base/7.0: status Fix Committed Fix Released