-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When CMock is out of memory it does not tell you so #463
Comments
That definitely doesn't sound like the intended implementation! Like you, I would want it to report the out-of-memory error first and foremost, since it's the root reason for the failure. Thanks for noticing this! When you say "overreach", I assume you mean selecting any size that can't actually be returned by the heap on that target? |
Yes, well array size that is available for a static array is not big enough but instead of reporting out of memory error, I just got strange behavior above. Removing one init/verify file solved that problem (or increase in CMOCK_MEM_SIZE variable) |
Thanks. I'm understanding. :) |
Line 56 in c548629
|
Hey @Letme -- I'm not finding why this would be a problem yet... You're sure it's Can you do me a favor? Can you send me a snapshot of your project.yml (or however you're configuring cmock) and one of the generated mock files (it'd be good if it was one giving you this problem) |
I have following flags to compile CMock (tested the latest) with static memory size and alignment:
The values don't matter, but the behavior becomes strange if you overreach the CMOCK_MEMSIZE. It reports Expect was not expected and when you remove that Expect it tells you it actually expected it. So you are in chicken and egg situation. I checked the code and
CMock_Guts_MemNew
actually reportsCMOCK_GUTS_NONE
in this case, but the messageCMockStringOutOfMemory
is never triggered/displayed. I checked unit tests and I am missing this case. I am not sure if it was intended to be implemented, or not.The text was updated successfully, but these errors were encountered: