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

Autotools: Refactor dmalloc check #14726

Merged
merged 1 commit into from
Jul 7, 2024
Merged

Autotools: Refactor dmalloc check #14726

merged 1 commit into from
Jul 7, 2024

Conversation

petk
Copy link
Member

@petk petk commented Jun 29, 2024

  • AC_SEARCH_LIBS automatically appends the library to the LIBS
  • AS_VAR_APPEND used for enabling Dmalloc check-funcs token
  • CS synced

@petk petk marked this pull request as draft June 29, 2024 21:00
@devnexen
Copy link
Member

seems looking ok, are you planning further changes ?

@petk
Copy link
Member Author

petk commented Jun 30, 2024

seems looking ok, are you planning further changes ?

Yes, sorry, I've opened this one too soon. Because AC_SEARCH_LIBS is for libraries that might be also in C library.

- AS_VAR_APPEND used for enabling Dmalloc check-funcs token
- CS synced
@petk petk marked this pull request as ready for review July 1, 2024 10:53
@petk
Copy link
Member Author

petk commented Jul 1, 2024

So, now I've added the AC_CHECK_LIB back and synced only CS. AC_CHECK_LIB is better for this. Some other M4 macros also add the -g flag but I won't sync this yet here. Perhaps in the future.

Also this dmalloc functionality currently still has one more pending fix #8465 because the headers need to be slightly moved around. Some symbols stuff and I have no idea why it happens yet. Fixing this in that PR is better. There might be even a simpler patch:

diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index e84defb3da..77026cd878 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -15,6 +15,8 @@
    +----------------------------------------------------------------------+
 */
 
+#include "php.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -59,7 +61,6 @@
 #endif
 
 #include "SAPI.h"
-#include "php.h"
 #include "php_ini.h"
 #include "php_main.h"
 #include "php_globals.h"

@petk petk merged commit 80e0c0a into php:master Jul 7, 2024
11 checks passed
@petk petk deleted the patch-dmalloc branch July 7, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants