New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new warning in inline.h:S_variant_under_utf8_count #16483
Comments
From @bulk88Created by @bulk88When compiling this code from inline.h S_variant_under_utf8_count. I get this warning. ----------------------- I am using VC 2003 32b. PERL_UINTMAX_T is a 64 bit int. Var count is This warning is new (fall/winter 2017) to blead perl and should be fixed Perl Info
|
From @khwilliamsonI attempted to fixt this in Please verify one way or another if it is fixed. |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Tue, 03 Apr 2018 07:56:35 -0700, khw wrote:
Fixed for VC, but a new warning introduced with GCC in every .o gcc -c -I.. -I.\include -I. -I.. -DWIN32 -DPERLDLL -DPERL_CORE -s -O2 -DPERL_T -- |
From @bulk88On Tue, 03 Apr 2018 13:37:37 -0700, bulk88 wrote:
Actually, this made things worse, this commit (SHA-1: 0cb2911 inline.h: Silence compiler warning) causes malloc corruption/segv/free to wrong pool when running "re/regexp.t" and a couple other regex related .t files . Example callstack of a crash. perl527.dll!Perl_safesysfree(void * where=0x00dd57b4) Line 354 + 0x6 C -- |
From @khwilliamsonOn Tue, 03 Apr 2018 20:25:06 -0700, bulk88 wrote:
I reverted the patch that made things worse. Now, please try the attached patch and let me know if it works. |
From @khwilliamson0003-XXX-for-bulk88.patchFrom 47f6b49fadd53fac49e3c0f7e40e20a0589ddad5 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Thu, 5 Apr 2018 08:27:32 -0600
Subject: [PATCH 3/3] XXX for bulk88
---
inline.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/inline.h b/inline.h
index 8c20e7583a..dc74c2daed 100644
--- a/inline.h
+++ b/inline.h
@@ -641,9 +641,11 @@ S_variant_under_utf8_count(const U8* const s, const U8* const e)
/* Process per-word as long as we have at least a full word left */
do { /* Commit 03c1e4ab1d6ee9062fb3f94b0ba31db6698724b1 contains an
explanation of how this works */
- count += ((((* (PERL_UINTMAX_T *) x) & PERL_VARIANTS_WORD_MASK) >> 7)
+ PERL_UINTMAX_T increment
+ = ((((* (PERL_UINTMAX_T *) x) & PERL_VARIANTS_WORD_MASK) >> 7)
* PERL_COUNT_MULTIPLIER)
>> ((PERL_WORDSIZE - 1) * CHARBITS);
+ count += (Size_t) increment;
x += PERL_WORDSIZE;
} while (x + PERL_WORDSIZE <= e);
}
--
2.11.0
|
From @bulk88On Thu, 05 Apr 2018 07:31:19 -0700, khw wrote:
New patch works okay on VC 32 bit and GCC 32 bit no warnings on either. -- |
From @khwilliamsonPushed as commit e586328 |
@khwilliamson - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#133037 (status was 'resolved')
Searchable as RT133037$
The text was updated successfully, but these errors were encountered: