-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Segmentation fault after bufferevent_write #1664
Comments
Can you make a simple reproducer? |
Or run under ASAN (or valgrind as a last resort) |
|
@happybanban Do you make sure the argument of bufferevent_write is right?
|
Thanks! data and size should be valid. Below is my source code. Please give me some suggestion.Thanks! void send_start(struct bufferevent* bev) |
@happybanban Then, the possible case is use-after-free. |
@happybanban just use ASan to verify your code You just need to compile your code with |
Hello, I got a issue after bufferevent_write is called.
It looks memcpy error at evbuffer_add (buffer.c)
memcpy-avx-unaligned
libevent version: libevent-2.1.12-stable
below is stack trace.
Thread 263 "xxxxx." received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff1ffd7700 (LWP 18737)]
__memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:148
148 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: no such file or directory
(gdb)
bt
#0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:148
#1 0x00007fffee5e8a03 in memcpy (__len=, __src=, __dest=)
at /usr/include/x86_64-linux-gnu/bits/string3.h:53
#2 evbuffer_add (buf=0x7fff940029f0, data_in=0x7fff1ffd63c0, datlen=6) at buffer.c:1781
#3 0x00007fffee5ee280 in bufferevent_write (bufev=, data=, size=) at bufferevent.c:454
Thanks.
The text was updated successfully, but these errors were encountered: