diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-09-09 15:53:06 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-09 15:53:06 +0200 |
commit | ad49ad39a1ce6ed6cd206df58acc6d2d81910459 (patch) | |
tree | a55f69da49393cbc37e4903883d84e9fbc45210a /locale.c | |
parent | 20e9530e10f79b9715c7128a51c310986ac6e46e (diff) | |
download | perl-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |