[GH-ISSUE #7] Evaluate use of system uthash #140

Closed
opened 2026-03-13 16:30:12 +03:00 by kerem · 4 comments
Owner

Originally created by @dvershinin on GitHub (Oct 24, 2020).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/7

Even quite conservative distros like CentOS 6, 7 and 8, all have uthash 2.0.2 available.

As I have checked, the module compiles just fine if I replace the include everywhere with <uthash.h>.

Would there be a problem to use this uthash version?

This would simplify instructions to simply install uthash-devel package on RedHat-based distros,
and uthash-dev on Debian-based distros.

And the resulting module file would use the system library which (potentially) receives security updates; lower mem use if something else besides this module uses the library.

Originally created by @dvershinin on GitHub (Oct 24, 2020). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/7 Even quite conservative distros like CentOS 6, 7 and 8, all have uthash 2.0.2 available. As I have checked, the module compiles just fine if I replace the include everywhere with `<uthash.h>`. Would there be a problem to use this uthash version? This would simplify instructions to simply install `uthash-devel` package on RedHat-based distros, and `uthash-dev` on Debian-based distros. And the resulting module file would use the system library which (potentially) receives security updates; lower mem use if something else besides this module uses the library.
kerem 2026-03-13 16:30:12 +03:00
Author
Owner

@ADD-SP commented on GitHub (Oct 25, 2020):

Thanks for the suggesting. Switching to system library is a good idea. I didn't actually notice that uthash is included in the system library.

After testing, uthash 2.0.1 works fine with Ubuntu 18.04 LTS. I've updated the dev branch to switch to the system library. Just to be safe, the dev branch will be tested for a month. If there are no new problems during the testing period I will release v2.0.1 and close this issue.

<!-- gh-comment-id:716099834 --> @ADD-SP commented on GitHub (Oct 25, 2020): Thanks for the suggesting. Switching to system library is a good idea. I didn't actually notice that uthash is included in the system library. After testing, uthash 2.0.1 works fine with Ubuntu 18.04 LTS. I've updated the dev branch to switch to the system library. Just to be safe, the dev branch will be tested for a month. If there are no new problems during the testing period I will release v2.0.1 and close this issue.
Author
Owner

@ADD-SP commented on GitHub (Dec 3, 2020):

Hello, v2.0.1 has been released and I will close this issue. If you find any related problems later, you can reopen this issue.

<!-- gh-comment-id:737651375 --> @ADD-SP commented on GitHub (Dec 3, 2020): Hello, [v2.0.1](https://github.com/ADD-SP/ngx_waf/releases/tag/v2.0.1) has been released and I will close this issue. If you find any related problems later, you can reopen this issue.
Author
Owner

@dvershinin commented on GitHub (Dec 3, 2020):

Currently, it fails to compile 2.0.1 with:

ngx_waf-2.0.1/src/ngx_http_waf_module_core.c:3:10: fatal error: ../inc/uthash/src/uthash.h: No such file or directory
 #include "../inc/uthash/src/uthash.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

So at least in src/ngx_http_waf_module_core.c the reference to include is invalid still.

<!-- gh-comment-id:737890841 --> @dvershinin commented on GitHub (Dec 3, 2020): Currently, it fails to compile 2.0.1 with: ``` ngx_waf-2.0.1/src/ngx_http_waf_module_core.c:3:10: fatal error: ../inc/uthash/src/uthash.h: No such file or directory #include "../inc/uthash/src/uthash.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ``` So at least in `src/ngx_http_waf_module_core.c` the reference to include is invalid still.
Author
Owner

@ADD-SP commented on GitHub (Dec 3, 2020):

Sorry, this is a stupid mistake. There are two reasons for this, the first is that I did not use a completely new environment for testing. The second reason is that I didn't change the CI configuration so that the CI could not detect the bug.

Could you retest to see if the problem is fixed? If it is resolved, please close this issue. If I don't hear from you for more than three days, I will assume it is resolved and close this issue.

In addition, I have found and fixed another serious error in my testing, see CHANGES.

Thanks for your help.

<!-- gh-comment-id:737988695 --> @ADD-SP commented on GitHub (Dec 3, 2020): Sorry, this is a stupid mistake. There are two reasons for this, the first is that I did not use a completely new environment for testing. The second reason is that I didn't change the CI configuration so that the CI could not detect the bug. Could you retest to see if the problem is fixed? If it is resolved, please close this issue. If I don't hear from you for more than three days, I will assume it is resolved and close this issue. In addition, I have found and fixed another serious error in my testing, see [CHANGES](https://github.com/ADD-SP/ngx_waf/blob/dev/CHANGES.md). Thanks for your help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#140
No description provided.