gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5474-gf529f3f6


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5474-gf529f3f6
Date: Mon, 3 Jun 2024 11:23:15 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-5.3-stable has been updated
       via  f529f3f6fb2e49db4d33164438df59fb26493fd4 (commit)
      from  a77bf658223515967d7ef3f2c6e959ac250f5615 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=f529f3f6fb2e49db4d33164438df59fb26493fd4

commit f529f3f6fb2e49db4d33164438df59fb26493fd4
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Jun 3 18:22:43 2024 +0300

    Add more malloc debugging options. Improve .developing tests.

diff --git a/ChangeLog b/ChangeLog
index f33da711..f07a6a1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-06-03         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * awk.h [USE_REAL_MALLOC]: Define this so that emalloc() and friends
+       use the real routines. For memory debugging.
+       * configure.ac: Enable USE_REAL_MALLOC if 'mallocdebug' is in
+       .developing. Add debug to .y files if 'yaccdebug' is in
+       .developing. Use '^...$' in grep test for all tests from
+       the .developing file.
+
 2024-05-19         Arnold D. Robbins     <arnold@skeeve.com>
 
        * awkgram.c: Updated.
diff --git a/awk.h b/awk.h
index 31908999..7a07f1ef 100644
--- a/awk.h
+++ b/awk.h
@@ -1390,9 +1390,15 @@ extern void r_freeblock(void *, int id);
 #define        cant_happen(format, ...)        r_fatal("internal error: file 
%s, line %d: " format, \
                                __FILE__, __LINE__, __VA_ARGS__)
 
+#ifdef USE_REAL_MALLOC
+#define        emalloc(var,ty,x,str)   (void) (var = (ty) malloc((size_t)(x)))
+#define        ezalloc(var,ty,x,str)   (void) (var = (ty) calloc((size_t)(x), 
1))
+#define        erealloc(var,ty,x,str)  (void) (var = (ty) realloc((void *) 
var, (size_t)(x)))
+#else
 #define        emalloc(var,ty,x,str)   (void) (var = (ty) 
emalloc_real((size_t)(x), str, #var, __FILE__, __LINE__))
 #define        ezalloc(var,ty,x,str)   (void) (var = (ty) 
ezalloc_real((size_t)(x), str, #var, __FILE__, __LINE__))
 #define        erealloc(var,ty,x,str)  (void) (var = (ty) erealloc_real((void 
*) var, (size_t)(x), str, #var, __FILE__, __LINE__))
+#endif
 
 #define efree(p)       free(p)
 
diff --git a/configure b/configure
index f6b35055..61a4975f 100755
--- a/configure
+++ b/configure
@@ -7096,6 +7096,11 @@ then
        then
                CFLAGS="$CFLAGS -Wall -fno-builtin"
        fi
+
+       if grep -i '^mallocdebug$' $srcdir/.developing > /dev/null
+       then
+               CFLAGS="$CFLAGS -DUSE_REAL_MALLOC"
+       fi
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 else
@@ -15012,18 +15017,21 @@ fi
 
 if test "$GCC" = yes &&
    test -f $srcdir/.developing &&
-   grep -i debug $srcdir/.developing > /dev/null
+   grep -i '^debug$' $srcdir/.developing > /dev/null
 then
-       for i in awkgram command
-       do
-               rm -f $i.c
-               ed - $i.y << \EOF
+       if grep -i '^yaccdebug$' $srcdir/.developing > /dev/null
+       then
+               for i in awkgram command
+               do
+                       rm -f $i.c
+                       ed - $i.y << \EOF
 /^%}/a
 %no-lines
 .
 w
 EOF
-       done
+               done
+       fi
        for i in . support
        do
                sed -e '/-O2/s///' -e '/^CFLAGS = /s//&${DEBUG} /' $i/Makefile 
> foo
diff --git a/configure.ac b/configure.ac
index a1a9507f..859726bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,6 +138,11 @@ then
        then
                CFLAGS="$CFLAGS -Wall -fno-builtin"
        fi
+
+       if grep -i '^mallocdebug$' $srcdir/.developing > /dev/null
+       then
+               CFLAGS="$CFLAGS -DUSE_REAL_MALLOC"
+       fi
        AC_MSG_RESULT([yes])
 else
        AC_MSG_RESULT([no])
@@ -489,18 +494,21 @@ fi
 AC_OUTPUT
 if test "$GCC" = yes &&
    test -f $srcdir/.developing &&
-   grep -i debug $srcdir/.developing > /dev/null
+   grep -i '^debug$' $srcdir/.developing > /dev/null
 then
-       for i in awkgram command
-       do
-               rm -f $i.c
-               ed - $i.y << \EOF
+       if grep -i '^yaccdebug$' $srcdir/.developing > /dev/null
+       then
+               for i in awkgram command
+               do
+                       rm -f $i.c
+                       ed - $i.y << \EOF
 /^%}/a
 %no-lines
 .
 w
 EOF
-       done
+               done
+       fi
        for i in . support
        do
                sed -e '/-O2/s///' -e '/^CFLAGS = /s//&${DEBUG} /' $i/Makefile 
> foo

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |  9 +++++++++
 awk.h        |  6 ++++++
 configure    | 20 ++++++++++++++------
 configure.ac | 20 ++++++++++++++------
 4 files changed, 43 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]