AriaFallah / csv-parser

Fast, header-only, extensively tested, C++11 CSV parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash in assignment of `std::unique_ptr<char[]>`

emmenlau opened this issue · comments

Hi, thanks for the nice work. I'm using the csv-parser since I while and it works well. However with the latest update there is a crash with clang-11 on Ubuntu 20.04. I could trace it in debugger to the following line:

std::unique_ptr<char[]> m_inputbuf = std::unique_ptr<char[]>(new char[INPUTBUF_CAP]{});

The code crashes with SIGSEGV. I could not immediately see whats wrong.

What code do you use to trigger this crash?

I wasn't able to reproduce the crash using clang-11 on Linux Mint 20.1 (based on Ubuntu 20.04), using the tests and benchmarks...

I'm not 100% certain that the crash is not unrelated and caused by memory corruption in another part of the application. I'll close this issue and re-open after further investigation...