[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, feature/pma, updated. gawk-4.1.0-4740-g683718b2
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, feature/pma, updated. gawk-4.1.0-4740-g683718b2 |
Date: |
Thu, 2 Jun 2022 08:59:53 -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, feature/pma has been updated
via 683718b2af4a3db677583bd29485fe3cdbdb1ae3 (commit)
from a0df079b4a4f620f5830cbe7136e420c141e6531 (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=683718b2af4a3db677583bd29485fe3cdbdb1ae3
commit 683718b2af4a3db677583bd29485fe3cdbdb1ae3
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Thu Jun 2 15:59:39 2022 +0300
Small fix to pma_free.
diff --git a/support/ChangeLog b/support/ChangeLog
index 63b5eb81..bc855b9b 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -7,6 +7,8 @@
enums?!?)
(pma_init): Allow state.init to be 0 or 2.
(NDEBUG): #undef before including <assert.h>.
+ (pma_free): If received a bad pointer, just call free()
+ on it and return. Change ERR to WRN.
2022-05-27 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/support/pma.c b/support/pma.c
index 139402f9..d16b16e9 100644
--- a/support/pma.c
+++ b/support/pma.c
@@ -584,10 +584,9 @@ void pma_free(void *ptr) {
assert(!IC);
if (NULL == ptr) return; // allowed by C & POSIX
if (! (VS state.hdr->afirst <= ptr && VS state.hdr->abound > ptr)) { //
e.g., p=strdup("foo") ... pma_free(p);
- ERR("freed ptr %p outside allocatable area bounds %p %p\n",
+ WRN("freed ptr %p outside allocatable area bounds %p %p\n",
ptr, VS state.hdr->afirst, VS state.hdr->abound);
- assert(0);
- SE;
+ free(p); // just be nice about it
return;
}
assert(0 == (uintptr_t)ptr % WDSZ);
-----------------------------------------------------------------------
Summary of changes:
support/ChangeLog | 2 ++
support/pma.c | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, feature/pma, updated. gawk-4.1.0-4740-g683718b2,
Arnold Robbins <=