This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Hoernchen gerrit-no-reply at lists.osmocom.orgHoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 )
Change subject: talloc asserts
......................................................................
talloc asserts
Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99
---
M sysmoOCTSIM/talloc.c
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/69/16269/1
diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c
index c5c9062..918cf42 100644
--- a/sysmoOCTSIM/talloc.c
+++ b/sysmoOCTSIM/talloc.c
@@ -30,6 +30,10 @@
inspired by http://swapped.cc/halloc/
*/
+#include <parts.h>
+#include <assert.h>
+#include <osmocom/core/utils.h>
+
#include "replace.h"
#include "talloc.h"
@@ -727,6 +731,9 @@
size_t total_len = TC_HDR_SIZE + size + prefix_len;
struct talloc_chunk *parent = NULL;
+ // do not allocate while handling interrupts!
+ OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) )
+
if (unlikely(context == NULL)) {
context = null_context;
}
@@ -1740,6 +1747,9 @@
{
struct talloc_chunk *tc;
+ // do not deallocate while handling interrupts!
+ OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) )
+
if (unlikely(ptr == NULL)) {
return -1;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99
Gerrit-Change-Number: 16269
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191127/76751bda/attachment.htm>