Skip to content

Commit e41e568

Browse files
committed
PQisBusy_stub is releasing master lock, so it can't be "noalloc"
According to section 20.11.2 of https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html, functions marked [@@noalloc] can not release master lock. Since 4.6.1, PQisBusy_stub is releasing master lock, so it can't be "noalloc" anymore. Having it as "noalloc" causes segfaults (I don't have a small reproducible example, but I think you can see how it could happen).
1 parent 728f152 commit e41e568

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/postgresql.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ module Stub = struct
498498
external consume_input : connection -> (int [@untagged])
499499
= "PQconsumeInput_stub_bc" "PQconsumeInput_stub" [@@noalloc]
500500

501-
external is_busy : connection -> bool = "PQisBusy_stub" [@@noalloc]
501+
external is_busy : connection -> bool = "PQisBusy_stub"
502502

503503
external flush : connection -> (int [@untagged])
504504
= "PQflush_stub_bc" "PQflush_stub" [@@noalloc]

0 commit comments

Comments
 (0)