lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Memory corruption problem with NIOS lwip port


From: Kaos
Subject: Re: [lwip-users] Memory corruption problem with NIOS lwip port
Date: Wed, 25 Feb 2004 16:41:00 +0100
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

My experience with printf is that it uses alot of stack (compared to the amount of bytes involved in the resulting buffer). So it might be worth while to verify the stack usage (and const value) before, during and after the printf call.

Rgds,
Andreas

David Aldrich wrote:

Hi

I have an application running on an Altera NIOS processor core.  I have
used the Altera PLUGS network stack but it has some deficiencies and has
insufficient performance for my application.

I am now experimenting with a NIOS port of LWIP.  I have a small test
application that demonstrates the port by running a very simple http
server.  This test app works fine, so the port works.

However, when I add to this test application, to migrate it toward my
real application, I run into problems.  I have little to go on except
that my main() starts with a printf statement as follows:

const char * kpszVersion = "1.18";

printf("My app version %s\n\r", kpszVersion);

With just two C++ modules in my application, the message prints
correctly.  When I add a simple, third module, the version number is
incorrect and hundreds of characters spew to the screen.  So I believe
the constant kpszVersion is being corrupted yielding a very long string.
This did not happen when linking with PLUGS.

I cannot identify the cause of this behaviour.  It would seem that the
memory allocated to the constant is being corrupted at runtime, or is
never initialised.

Can anyone suggest a reason for what is happening please?

Best regards

David


_______________________________________________
lwip-users mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lwip-users






reply via email to

[Prev in Thread] Current Thread [Next in Thread]