Commit a0d280e
committed
ICU-23120 Fix malloc request larger than PTRDIFF_MAX bytes
* glibc does not allow allocations that exceed PTRDIFF_MAX bytes:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9bf8e29ca136094f73f69f725f15c51facc97206
* Without this, we get compile failures on 32-bit platforms:
work/icu/source/test/intltest/ustrtest.cpp: In member function ‘void UnicodeStringTest::TestLargeMemory()’:
work/icu/source/test/intltest/ustrtest.cpp:2360:37: error: size ‘4294967286’ of array exceeds maximum object size ‘2147483647’
2360 | char16_t *buf = new char16_t[len];
| ^1 parent 795d7ac commit a0d280e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2356 | 2356 | | |
2357 | 2357 | | |
2358 | 2358 | | |
2359 | | - | |
| 2359 | + | |
2360 | 2360 | | |
2361 | 2361 | | |
2362 | 2362 | | |
| |||
0 commit comments