RFR(xs): JDK-8152329: jvm should treat the "Multi-Release" jar manifest attribute name as case insensitive
Calvin Cheung
calvin.cheung at oracle.com
Tue Apr 5 17:53:54 UTC 2016
On 4/5/16, 10:44 AM, Jiangli Zhou wrote:
> Hi Calvin,
>
> Have you thought about using strcasecmp()? The
> globalDefinitions_visCPP.hpp defines strcasecmp to _stricmp. So
> compiler dependency is not an issue. We have existing code that uses
> strcasecmp() for case insensitive comparison.
I don't think it will work in this situation. It is because the manifest
buffer contains all the jar manifest entries, not just the
"Multi-Release" entry. In other words, "Multi-Release" isn't at the
beginning of the string.
thanks,
Calvin
>
> // Non-standard stdlib-like stuff:
> inline int strcasecmp(const char *s1, const char *s2) { return
> _stricmp(s1,s2); }
>
> Thanks,
> Jiangli
>> On Apr 4, 2016, at 2:07 PM, Calvin Cheung <calvin.cheung at oracle.com
>> <mailto:calvin.cheung at oracle.com>> wrote:
>>
>>
>> Please review this small fix for:
>> https://bugs.openjdk.java.net/browse/JDK-8152329
>>
>> The fix is to convert the buffer containing the jar manifest into
>> lower case before performing strstr.
>>
>> webrev: http://cr.openjdk.java.net/~ccheung/8152329/webrev.01/
>>
>> Testing:
>> JPRT -testset hotspot
>> The tests under runtime on the platforms built by JPRT.
>>
>> thanks,
>> Calvin
>
More information about the hotspot-runtime-dev
mailing list