[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #37158] MEM_USE_POOLS==1: LWIP_ASSERT (rmem == LWIP_ME
From: |
Artem Pisarenko |
Subject: |
[lwip-devel] [bug #37158] MEM_USE_POOLS==1: LWIP_ASSERT (rmem == LWIP_MEM_ALIGN(rmem)) fails |
Date: |
Wed, 22 Aug 2012 04:45:54 +0000 |
User-agent: |
Opera/9.80 (Windows NT 6.1; WOW64; U; ru) Presto/2.10.289 Version/12.01 |
Follow-up Comment #2, bug #37158 (project lwip):
Yes, it's line 134 in my sources too. Seems like debugger interpret sources or
places breakpoints in some tricky way.
I'm writing my own port from scratch for STM32F2x7 MCU with ARM Cortex-M3
processor. This processor supports unaligned accesses in simple terms
(although ARMv7-M Architecture Reference Manual restricts unaligned access in
some cases and I'm not sure how gcc compiler workaround these ones).
Anyway it works ok as I said before (I've just configured to debug output
asserts). There are no need to remove asserts. 2nd assert doesn't fail, it's
ok. But I still didn't tested my port heavily. I've just run standard tcpecho
example from contribs until now.
Also I forget to say that I use non-original lwip sources. I modified them a
little to temporary solve bug #37148
<https://savannah.nongnu.org/bugs/?37148>:
diff --git a/lwip/core/memp.c b/lwip/core/memp.c
index 4da879a..d47cb11 100644
--- a/lwip/core/memp.c
+++ b/lwip/core/memp.c
@@ -104,10 +104,8 @@ struct memp {
#else /* MEMP_OVERFLOW_CHECK */
/* No sanity checks
- * We don't need to preserve the struct memp while not allocated, so we
- * can save a little space and set MEMP_SIZE to 0.
*/
-#define MEMP_SIZE 0
+#define MEMP_SIZE LWIP_MEM_ALIGN_SIZE(sizeof(struct memp))
#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x))
#endif /* MEMP_OVERFLOW_CHECK */
May be my solution wasn't correct and triggered this issue. But I cannot check
without this fix because my lwip port cannot even start without it.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?37158>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/