Commit f4ec97f
authored
Fix memory leak on error (#307)
* Create test_memory_leak_on_error.js
* fix test_memory_leak_on_error.js
* Update test_memory_leak_on_error.js
* Update test_memory_leak_on_error.js
* Fix a memory leak in db.exec
When an error was thrown in db.exec, the allocated stack was never restored
* Enable assertions in debug builds
* Fix assertion error in debug builds
Fix Assertion failed: you need to wait for the runtime to be ready (e.g.
wait for main() to be called)
* Fix memory leak on error in Database.exec
Memory was leaked when Database.exec was run and the
execution threw an error
* Disable the memory leak test by default
The memory leak test is expensive, and we don't want to run it every
time
* Prevent several memory leaks on error
I did not manage to trigger OOM errors with them,
but db.run and db.each were also vulnerable to #306
* Check the compiled files in1 parent e529b7d commit f4ec97f
File tree
15 files changed
+48551
-42822
lines changed- dist
- src
- test
15 files changed
+48551
-42822
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
0 commit comments