Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007883OCamlruntime system and C interfacepublic2018-12-21 13:522019-02-02 11:24
Assigned Tojacques-henri.jourdan 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.08.0+dev/beta1 
Summary0007883: Please add signals_are_pending to compatibility.h
Descriptionsignals_are_pending got renamed to signals_might_be_pending in [^] (4.08)
A compatibility #define should be added to compatibility.h

Context: we use it in Coq ( [^])
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
gasche (administrator)
2018-12-21 16:41

A change is in discussion, see [^]

of course, it is arguably a bad idea for Coq to be relying on private internals of the OCaml runtime, and it would be more future-proof to reimplement your own signal-handling logic (possibly asking Jacques-Henri for help?).
jacques-henri.jourdan (manager)
2018-12-21 23:10

Frankly, I thought a bit about that, and I am not sure what's best: on the one side, Coq has to hijack OCaml's internal mechanisms, but on the other side, it is rather hard to design a signal handling mechanism in C which properly handles all signals and interferes properly with OCaml's mechanism.

Note that Coq already greatly hijack's OCaml's internals in order to have an efficient implementation of te VM...

Perhaps the actual "proper" answer to this issue is to provide a /public/ #define macro in OCaml header which one can call periodically to handle signals.
jacques-henri.jourdan (manager)
2018-12-21 23:11

See [^] for the proposed fix.
ejgallego (reporter)
2018-12-22 00:30

We could also use #ifdef in Coq + <caml/version.h> to workaround that as we are talking about C code.

IMVHO, Coq's VM should not rely on this in the medium-long term. Instead, we must redesign the way signals are handled in Coq so low-level components don't have to care so much.

For example, another problematic point are UIs / coqtop / XML protocol dying on Ctrl-C.
jacques-henri.jourdan (manager)
2019-02-02 11:22

The patch in question has been reverted, and its replacement does no longer have this problem.

- Issue History
Date Modified Username Field Change
2018-12-21 13:52 SkySkimmer New Issue
2018-12-21 16:41 gasche Note Added: 0019513
2018-12-21 16:41 gasche Assigned To => jacques-henri.jourdan
2018-12-21 16:41 gasche Status new => assigned
2018-12-21 23:10 jacques-henri.jourdan Note Added: 0019516
2018-12-21 23:11 jacques-henri.jourdan Note Added: 0019517
2018-12-22 00:30 ejgallego Note Added: 0019518
2019-02-02 11:22 jacques-henri.jourdan Note Added: 0019576
2019-02-02 11:24 jacques-henri.jourdan Status assigned => resolved
2019-02-02 11:24 jacques-henri.jourdan Fixed in Version => 4.08.0+dev/beta1
2019-02-02 11:24 jacques-henri.jourdan Resolution open => fixed

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker