[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#403848: marked as done (ocaml: segfault on (unavoidably) closing a channel twice)

Your message dated Sat, 30 Dec 2006 19:32:04 +0000
with message-id <E1H0jw4-0001rG-Ew@ries.debian.org>
and subject line Bug#403848: fixed in ocaml 3.09.2-8
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: ocaml
Version: 3.09.2-7
Severity: important
Tags: patch

This is exactly bug http://caml.inria.fr/mantis/view.php?id=4039 and it
arises is several situations:

 - http://caml.inria.fr/pub/ml-archives/caml-list/2006/08/db4d1bda007d884bfed86ef086e9463e.en.html

 - I am using Unix.open_process_full to open stdout,stdin,stderr.
   stdin needs to be closed early, but that causes a segfault when
   close_process_full is called later.

The concise fix is in the attached patch and is apparently already in
the upstream 3.09 bugfix branch, and 3.10.

Is it too late to get this fix into etch?

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages ocaml depends on:
ii  ocaml-base [ocaml-base-3.09.2 3.09.2-7   Runtime system for ocaml bytecode 
ii  ocaml-nox [ocaml-nox-3.09.2]  3.09.2-7   ML language implementation with a 

ocaml recommends no packages.

-- no debconf information
diff -rupax ocamlc -x ocamllex ocaml-3.09.2/byterun/io.c ocaml-3.09.3~rc1/byterun/io.c
--- ocaml-3.09.2/byterun/io.c	2006-03-22 23:59:58.000000000 +1100
+++ ocaml-3.09.3~rc1/byterun/io.c	2006-06-09 00:57:59.000000000 +1000
@@ -11,7 +11,7 @@
 /*                                                                     */
-/* $Id: io.c,v 2006/03/22 12:59:58 doligez Exp $ */
+/* $Id: io.c,v 2006/06/08 14:57:59 xleroy Exp $ */
 /* Buffered input/output. */
@@ -534,7 +534,7 @@ CAMLprim value caml_ml_flush_partial(val
   struct channel * channel = Channel(vchannel);
   int res;
-  if (channel->fd == -1) return Val_true;
+  if (channel->fd == -1) CAMLreturn (Val_true);
   res = caml_flush_partial(channel);
@@ -546,7 +546,7 @@ CAMLprim value caml_ml_flush(value vchan
   CAMLparam1 (vchannel);
   struct channel * channel = Channel(vchannel);
-  if (channel->fd == -1) return Val_unit;
+  if (channel->fd == -1) CAMLreturn (Val_unit);
diff -rupax ocamlc -x ocamllex ocaml-3.09.2/byterun/memory.h ocaml-3.09.3~rc1/byterun/memory.h
--- ocaml-3.09.2/byterun/memory.h	2005-10-15 02:40:48.000000000 +1000
+++ ocaml-3.09.3~rc1/byterun/memory.h	2006-07-25 19:13:16.000000000 +1000
@@ -11,7 +11,7 @@
 /*                                                                     */
-/* $Id: memory.h,v 1.54 2005/10/14 16:40:48 xleroy Exp $ */
+/* $Id: memory.h,v 2006/07/25 09:13:16 doligez Exp $ */
 /* Allocation macros and functions */
@@ -278,8 +278,9 @@ CAMLextern struct caml__roots_block *cam
 }while (0)
 #define CAMLreturn(result) do{ \
+  value caml__temp_result = (result); \
   caml_local_roots = caml__frame; \
-  return (result); \
+  return (caml__temp_result); \
 #define CAMLnoreturn ((void) caml__frame)

--- End Message ---
--- Begin Message ---
Source: ocaml
Source-Version: 3.09.2-8

We believe that the bug you reported is fixed in the latest version of
ocaml, which is due to be installed in the Debian FTP archive:

  to pool/main/o/ocaml/ocaml-base-nox_3.09.2-8_i386.deb
  to pool/main/o/ocaml/ocaml-base_3.09.2-8_i386.deb
  to pool/main/o/ocaml/ocaml-compiler-libs_3.09.2-8_i386.deb
  to pool/main/o/ocaml/ocaml-interp_3.09.2-8_i386.deb
  to pool/main/o/ocaml/ocaml-mode_3.09.2-8_all.deb
  to pool/main/o/ocaml/ocaml-native-compilers_3.09.2-8_i386.deb
  to pool/main/o/ocaml/ocaml-nox_3.09.2-8_i386.deb
  to pool/main/o/ocaml/ocaml-source_3.09.2-8_all.deb
  to pool/main/o/ocaml/ocaml_3.09.2-8.diff.gz
  to pool/main/o/ocaml/ocaml_3.09.2-8.dsc
  to pool/main/o/ocaml/ocaml_3.09.2-8_i386.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 403848@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Samuel Mimram <smimram@debian.org> (supplier of updated ocaml package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Sat, 30 Dec 2006 19:01:12 +0000
Source: ocaml
Binary: ocaml-compiler-libs ocaml-native-compilers ocaml-base ocaml-nox ocaml-mode ocaml-interp ocaml-source ocaml-base-nox ocaml
Architecture: source i386 all
Version: 3.09.2-8
Distribution: unstable
Urgency: low
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Changed-By: Samuel Mimram <smimram@debian.org>
 ocaml      - ML language implementation with a class-based object system
 ocaml-base - Runtime system for ocaml bytecode executables
 ocaml-base-nox - Runtime system for ocaml bytecode executables
 ocaml-compiler-libs - Ocaml interpreter and standard libraries
 ocaml-interp - Ocaml interpreter and standard libraries
 ocaml-mode - A major mode for editing Objective Caml in Emacs
 ocaml-native-compilers - Native code compilers of the ocaml suite (the .opt ones)
 ocaml-nox  - ML language implementation with a class-based object system
 ocaml-source - Sources for Objective Caml
Closes: 355448 397245 403848
 ocaml (3.09.2-8) unstable; urgency=low
   [ Samuel Mimram ]
   * Installing ocamlbrowser in ocaml instead of ocaml-nox, closes: #397245.
   [ Julien Cristau ]
   * Add patch stolen from 3.09.3 to fix a segfault when a file is closed
     twice (closes: #403848).
   * Delete directories left over by the ocaml package from sarge in
     /usr/local (closes: #355448).
 55dc7cfa4616b43c26cbe5ea9b3a3fdb 1041 devel optional ocaml_3.09.2-8.dsc
 6fdf4c72b01138752abe61529eac121a 85834 devel optional ocaml_3.09.2-8.diff.gz
 8070e0fdef3ad5ac9d7d398b4ca63887 2079764 devel optional ocaml-source_3.09.2-8_all.deb
 052cfcf973be08356be89808d0399716 97036 devel optional ocaml-mode_3.09.2-8_all.deb
 a984b89c1d1539a90398ccc8951ccc38 5827902 devel optional ocaml-nox_3.09.2-8_i386.deb
 b699c62af64f72b9c8230bbf3d1592de 2810136 devel optional ocaml-native-compilers_3.09.2-8_i386.deb
 28017e04c29003b4bb80bd049cd3da8b 2026358 devel optional ocaml_3.09.2-8_i386.deb
 d05ceab2d997045e8c4178ca5f745e79 287788 devel optional ocaml-base-nox_3.09.2-8_i386.deb
 33e77b21480fb388442def1120924d0e 69128 devel optional ocaml-base_3.09.2-8_i386.deb
 871ee9c322b8725caf9386f724d38ddd 1017242 devel optional ocaml-interp_3.09.2-8_i386.deb
 4a8cd8f6999b49c49873fe1168561499 768112 devel optional ocaml-compiler-libs_3.09.2-8_i386.deb

Version: GnuPG v1.4.6 (GNU/Linux)


--- End Message ---

Reply to: