Skip to content

Commit

Permalink
Make binary/string constants static to avoid memory-access-related se…
Browse files Browse the repository at this point in the history
…gfaults in third party libraries

Change-Id: Ib8a053485822ea9c4e06b800def9654da9e0f9d9
  • Loading branch information
wesm committed Oct 17, 2016
1 parent 1e65b01 commit dca39ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cpp/src/arrow/types/string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
#include "arrow/type.h"

namespace arrow {
const std::shared_ptr<DataType> kBinary = std::make_shared<BinaryType>();
const std::shared_ptr<DataType> kString = std::make_shared<StringType>();

static std::shared_ptr<DataType> kBinary = std::make_shared<BinaryType>();
static std::shared_ptr<DataType> kString = std::make_shared<StringType>();

BinaryArray::BinaryArray(int32_t length, const std::shared_ptr<Buffer>& offsets,
const std::shared_ptr<Buffer>& data, int32_t null_count,
Expand Down

0 comments on commit dca39ce

Please sign in to comment.