I am writing a unit test and mocking library in C and I want to set the call stack memory to some pre determined value like memset. I want to do this before the test function is called so the test writer can verify they aren't using uninitialized memory in their tests. Is there any somewhat portable way to do this?
Ok, this is an option and I hate it, but I am open if to notes if anyone has any. I think I might have to inline assembly. Here is my first attempt: