Mercurial > vim
comparison src/ex_eval.c @ 25889:c83ebae45881 v8.2.3478
patch 8.2.3478: still crash with error in :catch and also in :finally
Commit: https://github.com/vim/vim/commit/f67d3fb7363ebc9454f9bb582de3978609a4fd6b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 5 11:22:27 2021 +0100
patch 8.2.3478: still crash with error in :catch and also in :finally
Problem: Still crash with error in :catch and also in :finally.
Solution: Only call finish_exception() once. (closes https://github.com/vim/vim/issues/8954)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 05 Oct 2021 12:30:04 +0200 |
parents | a58520ab7c3b |
children | 892f937358ea |
comparison
equal
deleted
inserted
replaced
25888:87ef006b26d4 | 25889:c83ebae45881 |
---|---|
2399 * exception. | 2399 * exception. |
2400 */ | 2400 */ |
2401 if (!(cstack->cs_flags[idx] & CSF_FINALLY)) | 2401 if (!(cstack->cs_flags[idx] & CSF_FINALLY)) |
2402 { | 2402 { |
2403 if ((cstack->cs_flags[idx] & CSF_ACTIVE) | 2403 if ((cstack->cs_flags[idx] & CSF_ACTIVE) |
2404 && (cstack->cs_flags[idx] & CSF_CAUGHT)) | 2404 && (cstack->cs_flags[idx] & CSF_CAUGHT) |
2405 && !(cstack->cs_flags[idx] & CSF_FINISHED)) | |
2406 { | |
2405 finish_exception((except_T *)cstack->cs_exception[idx]); | 2407 finish_exception((except_T *)cstack->cs_exception[idx]); |
2408 cstack->cs_flags[idx] |= CSF_FINISHED; | |
2409 } | |
2406 // Stop at this try conditional - except the try block never | 2410 // Stop at this try conditional - except the try block never |
2407 // got active (because of an inactive surrounding conditional | 2411 // got active (because of an inactive surrounding conditional |
2408 // or when the ":try" appeared after an error or interrupt or | 2412 // or when the ":try" appeared after an error or interrupt or |
2409 // throw). | 2413 // throw). |
2410 if (cstack->cs_flags[idx] & CSF_TRUE) | 2414 if (cstack->cs_flags[idx] & CSF_TRUE) |