1brc icon indicating copy to clipboard operation
1brc copied to clipboard

bug: beyond the bound of chunk

Open bbqz007 opened this issue 10 months ago • 1 comments

// this assumes the file ends in a newline...
    const char *end = (char *)memchr(&data[chunk_end], '\n', chunk_size) + 1;

data[chunk_end] is over the limit, the end of the chunk is data[chunk_end-1]

when the last workthread access the data[chunk_end], make SIGSEGV. i try nthread of 2,4,8. the problem issues.

bbqz007 avatar Apr 18 '24 15:04 bbqz007