This PR: - changes the implementation of `readBinFile` and `readFile` to only require two system calls (`stat` + `read`) instead of one `read` per 1024 byte chunk. - fixes a bug where `Handle.getLine` would get tripped up by a NUL character in the line and cut the string off. This is caused by the fact that the original implementation uses `strlen` and `lean_mk_string` which is the backer of `mk_string` does so as well. - fixes a bug where `Handle.putStr` and thus by extension `writeFile` would get tripped up by a NUL char in the line and cut the string off. Cause here is the use of `fputs` when a NUL char is possible. Closes: #4891 Closes: #3546 Closes: #3741 |
||
|---|---|---|
| .. | ||
| bench | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lean-toolchain | ||