-
Notifications
You must be signed in to change notification settings - Fork 77
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
Memory corruption when string.char(0)
used as a key
#2
Comments
@rohitjoshi Thanks for you feedback :) ps: replace |
@doujiang24 thanks for looking at this issue. yes, we have replaced str_null with "_" and working fine. just wanted to report this. We are able to reproduce only on one mac environment. Here is one of the stack trace but it is random and seeing different stack trace every time.
|
@rohitjoshi Will you use Valgrind to run your nginx process? You'd better turn off Also, it's better to specify the
while building the latest version of OpenResty (1.9.15.1). The position indicated by gdb may not be the first scene of crime while Valgrind can usually pinpoint that. Thanks! |
@agentzh we tried to run valgrind on mac osx but getting below error. Not able to reproduce on linux.
|
@rohitjoshi Yeah, Valgrind is shaky on Mac OS X. Try running Valgrind against exactly the same OpenResty app and setup on Linux to see if you can find anything. |
@agentzh we tried that. infact on mac osx, we are able to reproduce (consistently) only on my team member's mac . I could not reproduce on my mac. |
@rohitjoshi Still it's worth trying Valgrind since it can find memory issues that do not lead to segmentation faults. Ensure you have rebuilt OpenResty with the special |
@agentzh thanks. We will setup a nightly run with these options. |
@rohitjoshi BTW, those options only work with valgrind runs though. Do not attempt to run the resulting nginx without valgrind. |
We have been seeing occasional memory corruption when
string.char(0)
used as part of the key. We can reproduce core only on one machine. When replaced it with '_' , not able to reproduce core.`
local str_null = string.char(0)
`
The text was updated successfully, but these errors were encountered: