Ticket #6477 (new defect)

Bug contains 2 commit(s) | SVN Diffs for #6477

 

Opened 4 weeks ago

Last modified 3 weeks ago

Converter Open thread safety problem

Reported by: andy Assigned to: andy
Priority: critical Milestone: 4.1.1
Component: conversion Version:
Keywords: Cc:
Load: Xref:
Java Version: Operating System:
Project (C/J): ICU4C Weeks: .1
Review: dbertoni

Description

There is a thread safety hole in opening converters, in haveAliasData() in ucnvio.c

The problem was encountered by an internal Google user, and causes a null pointer crash.

The problem is that the UMTX_CHECK() macro, on strong memory model processors, does not block. When doing lazy initialization of something, the variable being tested by the macro must be the last thing assigned in the lazy init block. This didn't matter when we used mutexes around the test for initialization, but it does now.

We should review all uses of UMTX_CHECK() for other occurrences of this problem.

Attachments

Change History

08/04/08 14:30:26 changed by andy

  • revw set to dbertoni.

Add/Change #6477 (Converter Open thread safety problem)




Anti spam check: