openresty / openresty/lua-resty-core
The Call stack of ngx.re change
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 853
- Forks
- 286
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
The original ngx.re call link was ngx.re.find -->lua-nginx-module --> ngx_http_lua_ngx_re_find --> ngx_http_lua_ngx_re_match_helper
When compiling openresty, add the compile parameter --with-ld-opt /curl/lib/ -lcurl curl
The /lib/ directory contains the following files: libcurl.a libcurl.la libcurl.so libcurl.so.4 libcurl.so.4.3.0
./configure \
--prefix=/usr/local/openresty \
--with-ld-opt="-Wl,-rpath,/usr/local/openresty/luajit/lib \
-L/*/curl/lib/ -lcurl"
Then the function call stack for ngx.re.find becomes
ngx.re.find() --> re_match_helper -->ngx_lua_ffi_exec_regex -->ngx_http_lua_ffi_exec_regex
ngx.re.find() in regex.lua that calls lua-resty-core.
Why is that? Why does curllib affect the underlying call logic?
Help, thank you very much
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with regex.lua and the ngx.re.find entry point, then compare the call stacks described before and after adding the --with-ld-opt curl flags. Review the OpenResty configure and linking setup to identify why the selected path changes. Done means a reproducible explanation of the behavior, with the relevant call path and build conditions documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100