[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] makefs and mem_free errors
From: |
Mike Spenard |
Subject: |
Re: [lwip-users] makefs and mem_free errors |
Date: |
Tue, 2 Apr 2019 14:39:45 -0400 |
Correct, I misspoke... I simply meant 'generated' fsdata.c rather than
compiled.
I traced the "mem_free: mem->used" bomb out to the 404.html missing from
fsdata.c
The http_get_404_file() function checks for it missing:
if (err != ERR_OK) {
/* 404.htm doesn't exist either. Indicate to the caller that it
should
* send back a default 404 page.
*/
*uri = NULL;
return NULL;
...however, http_find_file() doesnt have any code to properly handle that
NULL:
} else {
file = http_get_404_file(hs, &uri);
}
I assume this is why I end up with a pbuf structure of heap allocated by
never flagged as Used. Which causes free_mem() to bomb out ...?
I'm a new player here, so has this been fixed in newer code than NXP
provided me with? Or am I misunderstanding things?
Mike
-----Original Message-----
From: lwip-users <address@hidden> On Behalf
Of address@hidden
Sent: Tuesday, April 2, 2019 2:29 PM
To: Mailing list for lwIP users <address@hidden>
Subject: Re: [lwip-users] makefs and mem_free errors
Am 02.04.2019 um 14:14 schrieb Mike Spenard:
> Hi Gents,
>
> New to LwIP so I apologize if this is a common topic. Im trying to
> get running on lwip-httpd.
>
> My first issue is with compiling an fsdata.c. I always get errors
> saying headers cannot be found despite using makefsfile.exe without
> the -h option. The only work-around was to set
> LWIP_HTTPD_DYNAMIC_HEADERS and to use the -h option with
> makefsfile.exe
Well, you don't compile fsdata.c: it gets included by fs.c.
>
> Having done that, my page now loads. But then httpd immediately bombs
> out with a mem_free: mem->used assert() error.
A double-free? I don't think that's a httpd related issue. Is any other
application running on your lwIP without problems?
Regards,
Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users