Skip to content

Commit 56db801

Browse files
committed
Preparing new release
1 parent ad7b72a commit 56db801

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

CHANGELOG

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
0.1.6 Upcoming
1+
0.1.6 April 14th 2016
22
FastPFOR and SIMDFastPFOR updated to use 512-int blocks (like JavaFastPFOR)
33
Added SIMDSimplePFOR
44
Added MaskedVByte
5+
Added StreamVByte
6+
More verbose error messages
57
0.1.5 August 21st 2014
68
Added SIMD versions of OptPFD and NewPFD.
79
Fixed buffer overrun in varintg8iu

headers/codecs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ class JustCopy : public IntegerCODEC {
110110
public:
111111
void encodeArray(const uint32_t *in, const size_t length, uint32_t *out,
112112
size_t &nvalue) {
113-
// if (length > nvalue)
114-
// cerr << "It is possible we have a buffer overrun. " << endl;
115113
memcpy(out, in, sizeof(uint32_t) * length);
116114
nvalue = length;
117115
}

headers/fastpfor.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,15 @@ class FastPFor : public IntegerCODEC {
122122
in += thissize;
123123
}
124124
assert(out == nvalue + initout);
125-
if (oldnvalue < nvalue)
126-
std::cerr << "It is possible we have a buffer overrun. " << std::endl;
125+
if (oldnvalue < nvalue)
126+
std::cerr
127+
<< "It is possible we have a buffer overrun. You reported having allocated "
128+
<< oldnvalue * sizeof(uint32_t)
129+
<< " bytes for the compressed data but we needed "
130+
<< nvalue * sizeof(uint32_t)
131+
<< " bytes. Please increase the available memory"
132+
" for compressed data or check the value of the last parameter provided "
133+
" to the encodeArray method." << std::endl;
127134
resetBuffer(); // if you don't do this, the buffer has a memory
128135
}
129136

@@ -346,8 +353,15 @@ class SimplePFor : public IntegerCODEC {
346353
in += thissize;
347354
}
348355
assert(out == nvalue + initout);
349-
if (oldnvalue < nvalue)
350-
std::cerr << "It is possible we have a buffer overrun. " << std::endl;
356+
if (oldnvalue < nvalue)
357+
std::cerr
358+
<< "It is possible we have a buffer overrun. You reported having allocated "
359+
<< oldnvalue * sizeof(uint32_t)
360+
<< " bytes for the compressed data but we needed "
361+
<< nvalue * sizeof(uint32_t)
362+
<< " bytes. Please increase the available memory"
363+
" for compressed data or check the value of the last parameter provided "
364+
" to the encodeArray method." << std::endl;
351365
}
352366

353367
void getBestBFromData(const uint32_t *in, uint8_t &bestb,

headers/simdfastpfor.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,15 @@ class SIMDFastPFor : public IntegerCODEC {
205205
in += thissize;
206206
}
207207
assert(out == nvalue + initout);
208-
if (oldnvalue < nvalue)
209-
std::cerr << "It is possible we have a buffer overrun. " << std::endl;
208+
if (oldnvalue < nvalue)
209+
std::cerr
210+
<< "It is possible we have a buffer overrun. You reported having allocated "
211+
<< oldnvalue * sizeof(uint32_t)
212+
<< " bytes for the compressed data but we needed "
213+
<< nvalue * sizeof(uint32_t)
214+
<< " bytes. Please increase the available memory"
215+
" for compressed data or check the value of the last parameter provided "
216+
" to the encodeArray method." << std::endl;
210217
resetBuffer(); // if you don't do this, the buffer has a memory
211218
}
212219

@@ -430,7 +437,14 @@ class SIMDSimplePFor : public IntegerCODEC {
430437
}
431438
assert(out == nvalue + initout);
432439
if (oldnvalue < nvalue)
433-
std::cerr << "It is possible we have a buffer overrun. " << std::endl;
440+
std::cerr
441+
<< "It is possible we have a buffer overrun. You reported having allocated "
442+
<< oldnvalue * sizeof(uint32_t)
443+
<< " bytes for the compressed data but we needed "
444+
<< nvalue * sizeof(uint32_t)
445+
<< " bytes. Please increase the available memory"
446+
" for compressed data or check the value of the last parameter provided "
447+
" to the encodeArray method." << std::endl;
434448
}
435449

436450
void getBestBFromData(const uint32_t *in, uint8_t &bestb,

0 commit comments

Comments
 (0)