Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: beyond the bound of chunk #5

Open
bbqz007 opened this issue Apr 18, 2024 · 1 comment
Open

bug: beyond the bound of chunk #5

bbqz007 opened this issue Apr 18, 2024 · 1 comment

Comments

@bbqz007
Copy link

bbqz007 commented Apr 18, 2024

// 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.

@dannyvankooten
Copy link
Owner

dannyvankooten commented Apr 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants