Skip to content

Commit 867f05d

Browse files
committed
Avoid ASAN odr error
like ==31311==ERROR: AddressSanitizer: odr-violation (0x7f3cda2e1480): [1] size=8 'provider_service_lz4' libservices/provider_service_lz4.c:14:17 [2] size=8 'provider_service_lz4' sql/sql_plugin_services.ic:301:33
1 parent 3f1bf68 commit 867f05d

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

include/providers/bzlib.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ extern "C" {
1212
#include <stdbool.h>
1313
#endif
1414

15+
#ifndef MYSQL_DYNAMIC_PLUGIN
16+
#define provider_service_bzip2 provider_service_bzip2_static
17+
#endif
18+
1519
#ifndef BZ_RUN
1620
#define BZ_RUN 0
1721
#define BZ_FINISH 2

include/providers/lz4.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ extern "C" {
1414
#include <stdint.h>
1515
#endif
1616

17+
#ifndef MYSQL_DYNAMIC_PLUGIN
18+
#define provider_service_lz4 provider_service_lz4_static
19+
#endif
20+
1721
#ifndef LZ4_VERSION_NUMBER
1822
#define LZ4_MAX_INPUT_SIZE 0x7E000000
1923

include/providers/lzma.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ extern "C" {
1414
#include <stddef.h>
1515
#endif
1616

17+
#ifndef MYSQL_DYNAMIC_PLUGIN
18+
#define provider_service_lzma provider_service_lzma_static
19+
#endif
20+
1721
#ifndef LZMA_VERSION
1822
typedef enum
1923
{

include/providers/lzo/lzo1x.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ extern "C" {
1212
#include <stdbool.h>
1313
#endif
1414

15+
#ifndef MYSQL_DYNAMIC_PLUGIN
16+
#define provider_service_lzo provider_service_lzo_static
17+
#endif
18+
1519
#ifndef LZO_E_OK
1620
#define LZO_E_OK 0
1721
#define LZO_E_INTERNAL_ERROR (-99)

include/providers/snappy-c.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ extern "C" {
1313
#include <stdbool.h>
1414
#endif
1515

16+
#ifndef MYSQL_DYNAMIC_PLUGIN
17+
#define provider_service_snappy provider_service_snappy_static
18+
#endif
19+
1620
#ifndef SNAPPY_C
1721
typedef enum
1822
{

0 commit comments

Comments
 (0)