13 Commits
8.0.3 ... 5.0.4

Author SHA1 Message Date
dhickin
95065787e6 Merge pull request #32 from dhickin/make_release_5.0.4
Make release 5.0.4
2016-03-07 18:54:44 +00:00
Dave Hickin
fda9144505 Split long line in README.md 2016-03-07 11:04:08 +00:00
Dave Hickin
ad4525317d Add release notes for 5.0.4 2016-03-05 01:58:59 +00:00
Dave Hickin
acd19c10d0 BitSet: truncation in or_and
For "this |= set1 & set2" the result size
should be "max(this, min(set1, set2))" while
at present it is "min(set1, set2)" resulting
in truncation if the LHS is longer than the
RHS.
(cherry picked from commit d4292d81f2)

Number of tests planned corrected.
2016-03-04 23:51:12 +00:00
Dave Hickin
0c2c6a4173 Fix win32 deserialization test fail
(cherry picked from commit 336a8b3bc2)
2016-03-04 23:00:44 +00:00
Dave Hickin
94781061cf fixed bitSet serialization
(cherry picked from commit 65ff7ab1c3)

Unit tests omitted as require API change.
2016-03-04 22:56:43 +00:00
Dave Hickin
fff9884b4c Update release notes for 5.0.3 release 2016-01-28 17:14:02 +00:00
Dave Hickin
8c92f5035b Split long line in README 2016-01-28 17:11:44 +00:00
Michael Davidsaver
cdb79f8a22 missing buffer capacity check in PVUnion::serialize
Allows a buffer overflow in PVUnionArray::serialize().
(cherry picked from commit 14b0e409f2)
2016-01-28 13:14:04 +00:00
Dave Hickin
7fc3f50ae9 Merge branch 'master' into release/5.0 2015-10-15 10:37:46 +01:00
Dave Hickin
d400e8eaf5 Merge branch 'master' into release/5.0 2015-10-15 09:39:53 +01:00
Ralph Lange
de2fac122c jenkins: fix CloudBees doc job 2015-09-28 15:29:17 +02:00
Ralph Lange
7707da0b45 jenkins: adapt doc script to new CloudBees jenkins job 2015-09-14 16:48:33 +02:00
6 changed files with 112 additions and 21 deletions

View File

@@ -1,7 +1,8 @@
pvaDataCPP
==========
pvDataCPP is a set of data types and utilities that form part of the EPICS V4 project.
pvDataCPP is a set of data types and utilities that form part of the EPICS V4
project.
Further Info

View File

@@ -1,6 +1,43 @@
<h1>Release 5.0</h1>
<h1>Release 5.0.4</h1>
<p>The main changes since release 4.0 are:</p>
<p>The changes since release 5.0.3 are:</p>
<ul>
<li>Fixed bitset serialization (issue #24)</li>
<li>Fixed truncation in BitSet::or_and (issue #27)</li>
</ul>
<h2>Fixed bitset serialization (issue #24)</h2>
<p>C++ bitset serialization was not consistent with the C++ deserialization and
Java code in some instances (depending on the endianness of the serializer and deserializer) when the number of bits was 56-63 modulo 64. C++ serialization
has been fixed.</p>
<p>Fix exposed issue in deserialization on 32-bit platforms which
has also been corrected. </p>
<h2>Fixed truncation in BitSet::or_and (issue #27)</h2>
<p>If n, n1 and n2 words are used to store the values of the bitsets bitset,
bitset1 and bitset2 respectively then max(n, min(n1,n2)) words are needed
to store bitset.or_(bitset1, bitset2).</p>
<p>Previously min(n1,n2) words were used and the result would be truncated in
some instances. This has been fixed.</p>
<h1>Release 5.0.3</h1>
<p>The only change since release 5.0.2 is:</p>
<h2>Fixed buffer overflow in PVUnion::serialize() (issue #20)</h2>
<p>A PVUnion whose stored value was null was serialized without checking
whether the buffer had sufficient capacity. This has been fixed by calling
ensureBuffer().</p>
<h1>Release 5.0.2</h1>
<p>The main changes since release 4.0.3 are:</p>
<ul>
<li>Deprecated getXXXField() methods have been removed from PVStructure</li>
@@ -133,7 +170,7 @@ pvData had issues due to PVStructure::DEFAULT_ID being used before being initial
This has been changed so the it returns a null pvStructure
and provides an error.</p>
<h1>Release 4.0</h1>
<h1>Release 4.0.3</h1>
<p>The main changes since release 3.0.2 are:</p>

View File

@@ -1,7 +1,50 @@
Release 5.0
===========
Release 5.0.4
=============
The main changes since release 4.0 are:
The changes since release 5.0.3 are:
* Fixed bitset serialization (issue #24)
* Fixed truncation in BitSet::or_and (issue #27)
Fixed bitset serialization (issue #24)
--------------------------------------
C++ bitset serialization was not consistent with the C++ deserialization and
Java code in some instances (depending on the endianness of the serializer and
deserializer) when the number of bits was 56-63 modulo 64. C++ serialization
has been fixed.
Fix exposed issue in deserialization on 32-bit platforms which
has also been corrected.
Fixed truncation in BitSet::or_and (issue #27)
----------------------------------------------
If n, n1 and n2 words are used to store the values of the bitsets bitset,
bitset1 and bitset2 respectively then max(n, min(n1,n2)) words are needed
to store bitset.or_(bitset1, bitset2).
Previously min(n1,n2) words were used and the result would be truncated in
some instances. This has been fixed.
Release 5.0.3
=============
The only change since release 5.0.2 is:
Fixed buffer overflow in PVUnion::serialize() (issue #20)
---------------------------------------------------------
A PVUnion whose stored value was null was serialized without checking
whether the buffer had sufficient capacity. This has been fixed by calling
ensureBuffer().
Release 5.0.2
=============
The main changes since release 4.0.3 are:
* Deprecated getXXXField() methods have been removed from PVStructure
* Convert copy methods and equals operators (re)moved
@@ -15,7 +58,7 @@ The main changes since release 4.0 are:
Deprecated getXXXField methods have been removed from PVStructure
-------------------------------------------------------------------
-----------------------------------------------------------------
The following methods have been removed from PVStructure
@@ -141,8 +184,8 @@ This has been changed so the it returns a null pvStructure
and provides an error.
Release 4.0
===========
Release 4.0.3
=============
The main changes since release 3.0.2 are:

View File

@@ -145,10 +145,10 @@ void PVUnion::serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) cons
if (variant)
{
// write introspection data
if (value.get() == 0)
if (value.get() == 0) {
pflusher->ensureBuffer(1);
pbuffer->put((int8)-1);
else
{
}else {
pflusher->cachedSerialize(value->getField(), pbuffer);
value->serialize(pbuffer, pflusher);
}

View File

@@ -279,7 +279,8 @@ namespace epics { namespace pvData {
uint32 inUse = (set1.wordsInUse < set2.wordsInUse) ? set1.wordsInUse : set2.wordsInUse;
ensureCapacity(inUse);
wordsInUse = inUse;
if(inUse>wordsInUse)
wordsInUse = inUse;
// Perform logical AND on words in common
for (uint32 i = 0; i < inUse; i++)
@@ -322,12 +323,14 @@ namespace epics { namespace pvData {
SerializeHelper::writeSize(len, buffer, flusher);
flusher->ensureBuffer(len);
for (uint32 i = 0; i < n - 1; i++)
n = len / 8;
for (uint32 i = 0; i < n; i++)
buffer->putLong(words[i]);
for (uint64 x = words[n - 1]; x != 0; x >>= 8)
buffer->putByte((int8) (x & 0xff));
if (n < wordsInUse)
for (uint64 x = words[wordsInUse - 1]; x != 0; x >>= 8)
buffer->putByte((int8) (x & 0xff));
}
void BitSet::deserialize(ByteBuffer* buffer, DeserializableControl* control) {
@@ -356,7 +359,7 @@ namespace epics { namespace pvData {
words[j] = 0;
for (uint32 remaining = (bytes - longs * 8), j = 0; j < remaining; j++)
words[i] |= (buffer->getByte() & 0xffL) << (8 * j);
words[i] |= (buffer->getByte() & 0xffLL) << (8 * j);
}

View File

@@ -146,12 +146,19 @@ static void testOperators()
b1.or_and(b2, b3);
str = toString(b1);
testOk1(str == "{2, 128}");
b1.clear(); b1.set(1);
b2.clear();
b3.clear(); b3.set(1);
std::cout<<"# "<<toString(b3)<<" |= "<<toString(b1)<<" & "<<toString(b2)<<"\n";
b3.or_and(b1, b2);
testOk(toString(b3) == "{1}", "%s == {1}", toString(b3).c_str());
}
MAIN(testBitSet)
{
testPlan(29);
testPlan(30);
testGetSetClearFlip();
testOperators();
return testDone();