Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
On OSX, we had a test failure on memory module. The problem was in
the realloc function (line 38):
void * realloc(void * ptr, size_t sz) {
size_t old_sz = malloc_size(ptr);
g_global_memory.dec(old_sz);
g_global_memory.inc(sz);
g_thread_memory.dec(old_sz);
g_thread_memory.inc(sz);
void * r = realloc_core(ptr, sz);
if (r || sz == 0)
return r;
else
...
The size of r could be bigger than sz. For instance,
|ptr| = 40 but |r| = 48
In the current code, here we only increase counters by 40.
But later when we free it, we decrease them by 48, and this
caused the problem, underflow of an unsigned counter in
g_global_memory.
|
||
|---|---|---|
| doc | ||
| examples/lean | ||
| script | ||
| src | ||
| tests/lean | ||
| .gitignore | ||
| .travis.osx.yml | ||
| .travis.windows.yml | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
Ubuntu 12.04 LTS 64bit, g++-4.8 | clang++-3.3
Windows, x86_64-w64-mingw32-g++-4.8.1
[Result of Build/UnitTest/Coverage/Dynamic Analysis]
About
Requirements
- C++11 compatible compiler: g++ (version >= 4.8.1), or clang++ (version >= 3.3)
- CMake
- GMP (GNU multiprecision library)
- MPFR (GNU MPFR Library)
- (optional) gperftools
Installing required packages at
Build Instructions
Miscellaneous
- Testing and Code Coverage
- Building Doxygen Documentation:
doxygen src/Doxyfile - Coding style
- Git Commit Convention
- Automatic builds
