Skip to content

Commit

Permalink
perl.h: Turn mutex warning into a panic
Browse files Browse the repository at this point in the history
This was my attempt to keep going and try to recover after a problem was
found:  an unbalanced number of  locks/unlocks.  However, in looking at
a many-million line execution trace, I realized that the recovery likely
doesn't lead to correct results, and we should quit immediately when it
happens.
  • Loading branch information
khwilliamson committed May 6, 2023
1 parent 9c2d797 commit 0f8fa88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions perl.h
Expand Up @@ -7134,10 +7134,10 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
MUTEX_UNLOCK(&PL_locale_mutex); \
} \
else if (PL_locale_mutex_depth <= 0) { \
DEBUG_L(PerlIO_printf(Perl_debug_log, \
"%s: %d: ignored attempt to unlock already" \
" unlocked locale; depth unchanged at %d\n", \
__FILE__, __LINE__, PL_locale_mutex_depth)); \
Perl_croak_nocontext("panic: %s: %d: attempting to unlock" \
" already unlocked locale; depth was" \
" %d\n", __FILE__, __LINE__, \
PL_locale_mutex_depth); \
} \
else { \
PL_locale_mutex_depth--; \
Expand Down

0 comments on commit 0f8fa88

Please sign in to comment.