summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-09 15:53:06 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-09 15:53:06 +0200
commitad49ad39a1ce6ed6cd206df58acc6d2d81910459 (patch)
treea55f69da49393cbc37e4903883d84e9fbc45210a /locale.c
parent20e9530e10f79b9715c7128a51c310986ac6e46e (diff)
downloadperl-ad49ad39a1ce6ed6cd206df58acc6d2d81910459.tar.gz
Provide more information in the message for "strxfrm() gets absurd".
Prefix it with "panic", report the two lengths that caused the sanity test failure, and add the message to perldiag.pod.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/locale.c b/locale.c
index 163f412ed1..5893212e86 100644
--- a/locale.c
+++ b/locale.c
@@ -232,7 +232,8 @@ Perl_new_collate(pTHX_ const char *newcoll)
const Size_t fb = strxfrm(xbuf, "ab", XFRMBUFSIZE);
const SSize_t mult = fb - fa;
if (mult < 1)
- Perl_croak(aTHX_ "strxfrm() gets absurd");
+ Perl_croak(aTHX_ "panic: strxfrm() gets absurd - a => %"UVuf", ab => %"UVuf,
+ (UV) fa, (UV) fb);
PL_collxfrm_base = (fa > (Size_t)mult) ? (fa - mult) : 0;
PL_collxfrm_mult = mult;
}