Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005193OCamlOCaml otherlibspublic2010-12-10 19:162013-10-07 16:24
Reportertill 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionlaterFixed in Version 
Summary0005193: Make unix.{localtime,gmtime} use non reentrant c calls
DescriptionAttached is a patch to make it call out to {localtime,gmtime}_r which are the reentrant versions of these calls.
Tagspatch
Attached Filespatch file icon reentrant.patch [^] (717 bytes) 2010-12-10 19:16 [Show Content]

- Relationships

-  Notes
(0005733)
till (reporter)
2010-12-10 19:17

oops the category should have been the compiler. Please reassign.
(0005752)
xleroy (administrator)
2010-12-22 15:05

This change has been proposed before, but I am reluctant to implement it, for several reasons:

- gmtime_r() is "less standard" than gmtime(), the latter being in ISO C.
- All C libraries worth their salt implement gmtime() using thread-local storage, and are therefore thread-safe.
- Two gmtime() calls from Caml cannot execute concurrently because of the global lock, so the only risk of a race is with a gmtime() executing concurrently in a C thread.

All in all, I'd rather not change the current code until the problem above manifests itself in practice.

- Issue History
Date Modified Username Field Change
2010-12-10 19:16 till New Issue
2010-12-10 19:16 till Status new => assigned
2010-12-10 19:16 till Assigned To => guesdon
2010-12-10 19:16 till File Added: reentrant.patch
2010-12-10 19:17 till Note Added: 0005733
2010-12-14 16:10 doligez Assigned To guesdon =>
2010-12-14 16:10 doligez Status assigned => acknowledged
2010-12-14 16:10 doligez Category OCamldoc => OCaml general
2010-12-22 15:05 xleroy Note Added: 0005752
2012-07-10 17:18 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-19 14:29 doligez Category OCaml general => OCaml otherlibs
2012-09-19 14:29 doligez Target Version 4.00.1+dev => later
2013-10-07 16:24 doligez Tag Attached: patch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker