[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 08/16: libihash: Make sure we do not remove a locp several times
From: |
Samuel Thibault |
Subject: |
[hurd] 08/16: libihash: Make sure we do not remove a locp several times |
Date: |
Tue, 09 Jan 2018 01:35:29 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit c4cb76bb13d01eaa93ee77ba5b490f5d1a991155
Author: Samuel Thibault <address@hidden>
Date: Sat Jan 6 01:33:40 2018 +0100
libihash: Make sure we do not remove a locp several times
Suggested by Brent W. Baccala.
* libihash/ihash.c: Include <assert-backtrace.h>.
(locp_remove): Assert that item->value is valid.
* libihash/Makefile (HURDLIBS): Add shouldbeinlibc.
---
libihash/Makefile | 1 +
libihash/ihash.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/libihash/Makefile b/libihash/Makefile
index 3377ef4..7ceaf1d 100644
--- a/libihash/Makefile
+++ b/libihash/Makefile
@@ -23,6 +23,7 @@ libname := libihash
SRCS = ihash.c murmur3.c
installhdrs = ihash.h
+HURDLIBS = shouldbeinlibc
OBJS = $(SRCS:.c=.o)
include ../Makeconf
diff --git a/libihash/ihash.c b/libihash/ihash.c
index 2fc7093..1b25544 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
+#include <assert-backtrace.h>
#include "ihash.h"
@@ -110,6 +111,7 @@ static inline void
locp_remove (hurd_ihash_t ht, hurd_ihash_locp_t locp)
{
struct _hurd_ihash_item *item = (struct _hurd_ihash_item *) locp;
+ assert_backtrace (hurd_ihash_value_valid (item->value));
if (ht->cleanup)
(*ht->cleanup) (item->value, ht->cleanup_data);
item->value = _HURD_IHASH_DELETED;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (83fef6c -> 104f312), Samuel Thibault, 2018/01/08
- [hurd] 07/16: libfshelp/get-identity.c: Avoid spurious ihash removal, Samuel Thibault, 2018/01/08
- [hurd] 09/16: libfshelp/get-identity.c: Simplify checking weak references, Samuel Thibault, 2018/01/08
- [hurd] 06/16: libfshelp/get-identity: Use 64bit hashing for inodes, Samuel Thibault, 2018/01/08
- [hurd] 08/16: libihash: Make sure we do not remove a locp several times,
Samuel Thibault <=
- [hurd] 02/16: Record executable entry for PIE core dumps, Samuel Thibault, 2018/01/08
- [hurd] 04/16: libfshelp: Add weak reference for hash table reference, Samuel Thibault, 2018/01/08
- [hurd] 13/16: rpctrace: Pass prefixed_name to _hurd_exec_paths., Samuel Thibault, 2018/01/08
- [hurd] 05/16: libfshelp/get-identity.c: add FIXME, Samuel Thibault, 2018/01/08
- [hurd] 01/16: Reserve IDs for proc_set_exe and proc_get_exe, Samuel Thibault, 2018/01/08
- [hurd] 12/16: Use the new _hurd_exec_file_name function, Samuel Thibault, 2018/01/08
- [hurd] 16/16: Implement /proc/<pid>/exe, Samuel Thibault, 2018/01/08
- [hurd] 14/16: Fix exec_paths through fakeroot or chroot, Samuel Thibault, 2018/01/08
- [hurd] 10/16: Add a new exec_exec_paths RPC, Samuel Thibault, 2018/01/08
- [hurd] 15/16: Add support for $ORIGIN rpath expansion, Samuel Thibault, 2018/01/08