mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
fix ubsan final
This commit is contained in:
parent
5c97106ea3
commit
dac7a39256
@ -86,7 +86,10 @@ static INLINE void memcpy_sse2_128(void *dst, const void *src) {
|
|||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// tiny memory copy with jump table optimized
|
// tiny memory copy with jump table optimized
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
static INLINE void *memcpy_tiny(void *dst, const void *src, size_t size) {
|
/// Attribute is used to avoid an error with undefined behaviour sanitizer
|
||||||
|
/// ../contrib/FastMemcpy/FastMemcpy.h:91:56: runtime error: applying zero offset to null pointer
|
||||||
|
/// Found by 01307_orc_output_format.sh, cause - ORCBlockInputFormat and external ORC library.
|
||||||
|
__attribute__((__no_sanitize__("undefined"))) static INLINE void *memcpy_tiny(void *dst, const void *src, size_t size) {
|
||||||
unsigned char *dd = ((unsigned char*)dst) + size;
|
unsigned char *dd = ((unsigned char*)dst) + size;
|
||||||
const unsigned char *ss = ((const unsigned char*)src) + size;
|
const unsigned char *ss = ((const unsigned char*)src) + size;
|
||||||
|
|
||||||
|
@ -23,9 +23,7 @@ ORCBlockInputFormat::ORCBlockInputFormat(ReadBuffer & in_, Block header_) : IInp
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Attribute is used to avoid an error with undefined behaviour sanitizer
|
Chunk ORCBlockInputFormat::generate()
|
||||||
/// ../contrib/FastMemcpy/FastMemcpy.h:91:56: runtime error: applying zero offset to null pointer
|
|
||||||
__attribute__((__no_sanitize__("undefined"))) Chunk ORCBlockInputFormat::generate()
|
|
||||||
{
|
{
|
||||||
Chunk res;
|
Chunk res;
|
||||||
const Block & header = getPort().getHeader();
|
const Block & header = getPort().getHeader();
|
||||||
|
Loading…
Reference in New Issue
Block a user