Running allocate_module.c on windows....
C:\src-cmockery\cmockery\windows>allocate_module_test.exe
leak_memory_test: Starting test
Blocks allocated...
0x00032c18 : ..\src\example\allocate_module.c:36
ERROR: leak_memory_test leaked 1 block(s)
leak_memory_test: Test failed.
buffer_overflow_test: Starting test
Guard block of 0x00032c50 size=4 allocated by
..\src\example\allocate_module.c:41 at 0x00032c54 is corrupt
ERROR: ..\src\example\allocate_module.c:43 Failure!
buffer_overflow_test: Test failed.
buffer_underflow_test: Starting test
Guard block of 0x00032ca8 size=4 allocated by
..\src\example\allocate_module.c:47 at 0x00032ca7 is corrupt
ERROR: ..\src\example\allocate_module.c:49 Failure!
buffer_underflow_test: Test failed.
3 out of 3 tests failed!
leak_memory_test
buffer_overflow_test
buffer_underflow_test
Blocks allocated...
0x00032c18 : ..\src\example\allocate_module.c:41
0x00032c70 : ..\src\example\allocate_module.c:47
Guard block of 0x00032c50 size=4 allocated by
..\src\example\allocate_module.c:41 at 0x00032c54 is corrupt
ERROR: ..\src\cmockery.c:1463 Failure!
On Linux....
cmockery2$./allocate_module_test
leak_memory_test: Starting test
Blocks allocated...
0x00601150 : src/example/allocate_module.c:36
ERROR: leak_memory_test leaked 1 block(s)
leak_memory_test: Test failed.
buffer_overflow_test: Starting test
Guard block of 0x006011b0 size=4 allocated by
src/example/allocate_module.c:41 at 0x006011b4 is corrupt
ERROR: src/example/allocate_module.c:43 Failure!
buffer_overflow_test: Test failed.
buffer_underflow_test: Starting test
Guard block of 0x00601230 size=4 allocated by
src/example/allocate_module.c:47 at 0x0060122f is corrupt
ERROR: src/example/allocate_module.c:49 Failure!
buffer_underflow_test: Test failed.
3 out of 3 tests failed!
leak_memory_test
buffer_overflow_test
buffer_underflow_test
Blocks allocated...
0x00601150 : src/example/allocate_module.c:41
0x006011d0 : src/example/allocate_module.c:47
Guard block of 0x006011b0 size=4 allocated by
src/example/allocate_module.c:41 at 0x006011b4 is corrupt
ERROR: src/cmockery.c:1463 Failure!
The leak_memory_test fails in both my test cases. Could you give the
exact steps you're using to build cmockery, the platform and your test
output?
Thanks,
Stewart