Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[perl #129106] Check for null PL_curcop in IN_LC()
or, rather, in macros that it calls. When exiting a string eval, the current cop may be freed, so PL_curcop gets set to null. With the -DC option, we may end up printfing NVs during scope exit, so the locale macros used to make sure that the locale is sane before converting the numbers to strings need to make sure not to read PL_curcop->cop_hints when PL_curcop is null. This used to crash with: ./miniperl -DC -e'eval "l/A"' I’m not sure how to write a test for this, or even whether it’s worth writing a test for -D, which often changes behaviour depending on porters’ whims.
- Loading branch information