mjansson / foundation_lib

Cross-platform public domain foundation library in C providing basic support data types and functions to write applications and games in a platform-independent fashion.
The Unlicense
301 stars 23 forks source link

tests crash on VS2013 when building as debug and release #3

Closed shibo0305 closed 10 years ago

shibo0305 commented 10 years ago

I downloaded the zip file and test this lib on windows. I used VS2013 and built it under all configs(debug, release, deploy and profile). when I run the tests, all of them crashed(100%) under debug and release. However, the tests are OK under deploy and profile. callstack shows a parameter passed to HeapReAlloc is 0xdeadbeef. please try to run tests under debug, and I'm sure you can see it and resolve the problem. Thanks!

mjansson commented 10 years ago

I guess you executed 'test-all'? If so, which test is it that crashes? I will try to reproduce this locally asap.

shibo0305 commented 10 years ago

@MJansson Not only just "test-all", but also any other test, such as "string".

mjansson commented 10 years ago

The problem is with the memory guard feature in Windows 32-bit. Will fix asap, but for now you can set BUILD_ENABLE_MEMORY_GUARD to 0 in build.h for debug & release configs.

mjansson commented 10 years ago

I pushed a fix to the develop branch which should solve this, please try it

https://github.com/rampantpixels/foundation_lib/commit/bb57a34a4f1fef6c0621512f6dc0bb1334985fa2

mjansson commented 10 years ago

Fix verified locally, merged to master

shibo0305 commented 10 years ago

@MJansson I tried the new version and it's OK. Thanks! BTW, could you offer some document about this lib? I viewed your home page but couldn't found any document. so I'm going to read the source code very carefully first. I like this lib and want to use it in my products, thank you!

mjansson commented 10 years ago

I'm working on API documentation which is partly available already by using doxygen (there is a doxygen setup in the doc subdirectory).

Once that is done I will add more overview documentation as well.