Fix crash when importing a module with errors twice (#3497)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
When a module fails to parse as a library, `load_library` cached the invalid block. A second import/include of the same module would find the cached invalid block and pass it to `block_bind_library`, triggering the assertion failure. Skip caching the block when there are parse errors to avoid this problem.
authored by itchyny · committed by GitHub · parent ed3c7f2 · Browse files · 1 file+7 added−5 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+7 added−5 removed
- other:+7 added−5 removed