[SeaBIOS] Is there a limit on the stack

Daniel Castro evil.dani at gmail.com
Tue Feb 14 00:34:22 CET 2012

Hello All,

I am manipulating a lot of strings inside in the 32 bit init code,
mostly by creating a pointer to char on the stack, and allocating the
memory with malloc_high, but is done more than 20 times in some parts
of the method. Lately I have seen that whenever I reference a pointer
that was defined and used in the beginning I will get a fault, so I
thought that maybe there is some kind of limitation on the stack or
the memory area that is overwriting some of my variables or data in
the stack or in the memory.
For example I define a variable in the stack like char * device =
then I copy some string to that space, memcpy(device,old_device,10):
Many lines later I try to do this:
dprintf(1,"My current device is: %s",device);
The printf will generate a fault, also if I try this:
dprintf(1,"Device is currently at %p",device);
This will also generate a fault, so my guess is that the pointer was
lost somehow in the stack.

Any ideas?



| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |

More information about the SeaBIOS mailing list