lwIP - A Lightweight TCP/IP stack - Bugs: bug #17922, mem_malloc bug
You are not allowed to post comments on this tracker with your current authentication level.
bug #17922: mem_malloc bug
Submitter: | None | ||
Submitted: | Thu 05 Oct 2006 09:29:25 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | None |
Jump to the original submission
Sun 13 May 2007 02:08:01 PM UTC, comment #25: |
Simon Goldschmidt <goldsimon> |
Tue 08 May 2007 10:51:01 AM UTC, comment #24:
|
Simon Goldschmidt <goldsimon> |
Tue 08 May 2007 09:08:00 AM UTC, comment #23: re the patch: I have no reason to doubt it works. Silence is silent agreement :-).
|
Jonathan Larmour <jifl> |
Mon 07 May 2007 07:52:21 PM UTC, comment #22: Ok, checked it in. I hope I don't hear anything about it which would mean it works ;-)
|
Simon Goldschmidt <goldsimon> |
Mon 07 May 2007 07:14:40 PM UTC, comment #21: Since noone is answering, I'm checking the patch in, now and setting it as default. We do have a bug here and I want that solved. As it works for me, that way, at least I get some feedback if it's wrong ;-) |
Simon Goldschmidt <goldsimon> |
Thu 03 May 2007 05:53:38 PM UTC, comment #20: Can anyone comment whether the patch in file #12598 works correct?
|
Simon Goldschmidt <goldsimon> |
Thu 26 Apr 2007 06:53:52 PM UTC, comment #19: Christiaan, I've tried the 3 different versions with the TCP echo server included in contrib/ports/unix/proj/unixsim/apps/tcpecho.c under windows. It works for hours using Adam's original mem_malloc() and my modified version.
|
Simon Goldschmidt <goldsimon> |
Thu 26 Apr 2007 07:02:58 AM UTC, comment #18:
|
Christiaan Simons <christiaans> |
Wed 25 Apr 2007 08:04:07 PM UTC, comment #17: OK, this time I modified Christiaans version of mem_malloc(). This works for me:
|
Simon Goldschmidt <goldsimon> |
Wed 25 Apr 2007 03:22:32 PM UTC, comment #16:
I saw it was already that way in the first version checked into svannah CVS... Maybe noone ever really cared, but I think I'll change that, too. |
Simon Goldschmidt <goldsimon> |
Wed 25 Apr 2007 11:44:28 AM UTC, comment #15: No idea. Didn't look at the stats, and yes it seems wrong too.
|
Christiaan Simons <christiaans> |
Wed 25 Apr 2007 10:51:57 AM UTC, comment #14: As I said, Jonathan seems to have more trust in me than I do ;-)
|
Simon Goldschmidt <goldsimon> |
Wed 25 Apr 2007 07:30:37 AM UTC, comment #13: Please have a look at what i've tried before (change the #if 1 into 0). There are two cases in malloc.
|
Christiaan Simons <christiaans> |
Tue 24 Apr 2007 07:16:07 PM UTC, comment #12:
|
Simon Goldschmidt <goldsimon> |
Tue 24 Apr 2007 03:40:48 PM UTC, comment #11: From looking at it, it seems plausible. Since you've tested it, I'm sure that's good enough to go with.
|
Jonathan Larmour <jifl> |
Tue 24 Apr 2007 03:21:34 PM UTC, comment #10:
|
Simon Goldschmidt <goldsimon> |
Wed 11 Apr 2007 03:11:55 PM UTC, comment #9: Maybe it might be worth tweaking mem.h to be something like:
|
Jonathan Larmour <jifl> |
Wed 11 Apr 2007 11:34:13 AM UTC, comment #8:
|
Simon Goldschmidt <goldsimon> |
Wed 11 Apr 2007 10:43:44 AM UTC, comment #7: Certain implementations have (empty) __malloc_lock(), __malloc_unlock() function external to the actual malloc for this purpose.
|
Christiaan Simons <christiaans> |
Wed 11 Apr 2007 09:51:06 AM UTC, comment #6: When using MEM_LIBC_MALLOC, at least on some platforms, there will be a multithreading problem since malloc() is by default not protected. Is this a problem? Should we have a semaphore around the calls to malloc/free/realloc as we have it in our normal mem_malloc() implementation?
|
Simon Goldschmidt <goldsimon> |
Tue 23 Jan 2007 12:45:33 PM UTC, comment #5: In my opinion the following Code does the same as using “_attribute_ ((aligned (MEM_ALIGNMENT)))”. I’m not an expert in C programming and lwip so there might be another problem.
|
Andreas Funcke <funcke> |
Mon 22 Jan 2007 08:17:56 AM UTC, comment #4: I can't recommend your fix since it highly depends on gcc specific attributes. AFAIK attributes aren't ANSI C. My fix doesn't guarantee alignment, since it depends on the alignment of the struct ram_heap, usually the alignment of the first member of this struct.
|
Christiaan Simons <christiaans> |
Sun 21 Jan 2007 09:05:49 AM UTC, comment #3: Hello, I’m a newbie and had problems with the alignment in mem.c too. I realized a fix which is working in the following way. I hope this information will help others too.
|
Andreas Funcke <funcke> |
Fri 01 Dec 2006 03:50:53 PM UTC, comment #2: Fix in CVS doesn't work for me, but I can't find the reason why it fails.
|
Christiaan Simons <christiaans> |
Mon 27 Nov 2006 02:31:54 PM UTC, comment #1: Fix in CVS. Please confirm solution, this issue is blocking current release plan. |
Christiaan Simons <christiaans> |
Thu 05 Oct 2006 09:29:25 PM UTC, original submission:
I've run across what I believe to be a bug in mem_malloc.
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-05-13 | goldsimon | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2007-05-03 | goldsimon | Attached File | - | Added mem.c3.patch, #12681 | |
2007-04-25 | goldsimon | Attached File | - | Added mem.c2.patch, #12598 | |
2007-04-24 | goldsimon | Attached File | - | Added mem.c.patch, #12588 | |
2007-04-11 | christiaans | Assigned to | christiaans | None | |
2006-12-01 | christiaans | Severity | 4 - Important | 3 - Normal | |
2006-11-20 | christiaans | Severity | 3 - Normal | 4 - Important | |
Assigned to | None | christiaans |
Powered by Savane 3.13-f8d8.
Corresponding source code
I'm now closing this as fixed, someone reopen it if they find it to be unstable/unsatisfying.