Skip to content

Commit

Permalink
XXX pp.c: do %g print under mutex,
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed May 6, 2021
1 parent 332ffa5 commit 1080621
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pp.c
Expand Up @@ -2879,10 +2879,16 @@ PP(pp_sin)
#if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
! Perl_isnan(value) &&
#endif
(op_type == OP_LOG ? (value <= 0.0) : (value < 0.0))) {
(op_type == OP_LOG ? (value <= 0.0) : (value < 0.0)))
{
char * mesg;
SETLOCALE_LOCK;
SET_NUMERIC_STANDARD();
mesg = Perl_form(aTHX_ "Can't take %s of %" NVgf, neg_report, value);
SETLOCALE_UNLOCK;

/* diag_listed_as: Can't take log of %g */
DIE(aTHX_ "Can't take %s of %" NVgf, neg_report, value);
DIE(aTHX_ "%s", mesg);
}
}
switch (op_type) {
Expand Down

0 comments on commit 1080621

Please sign in to comment.