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

Bug#844038: marked as done (ocamlnet: FTBFS on hurd-i386: PATH_MAX)



Your message dated Thu, 20 Aug 2020 11:34:30 +0000
with message-id <E1k8ipy-000ANh-WA@fasolo.debian.org>
and subject line Bug#844038: fixed in ocamlnet 4.1.8-1
has caused the Debian Bug report #844038,
regarding ocamlnet: FTBFS on hurd-i386: PATH_MAX
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
844038: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844038
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: ocamlnet
Version: 4.1.2-1
Severity: important
Tags: upstream patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hello,

ocamlnet currently FTBFS on hurd-i386 due to an inconditional usage of
PATH_MAX, which is not defined there since there is no such arbitrary
limit. The attached patch avoids using by by just reading the symlink
length, and adjusting the size in case the symlink length increased in
between through really bad concurrency luck.

I'm afraid I couldn't easily find the upstream URL for posting such
report, both the sourceforge tracker and the ocamlnet3 tracker seemed
outdated, and there is no link to a ocamlnet4 tracker.

Samuel

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
  bien sûr que ça convient mieux à tout le monde
  enfin, dans la mesure où tout le monde c'est comme moi
 -+- le consensus, c'est facile -+-
--- ./src/netsys/netsys_c.c.original	2016-11-11 23:14:29.000000000 +0000
+++ ./src/netsys/netsys_c.c	2016-11-11 23:25:42.000000000 +0000
@@ -607,12 +607,32 @@
 CAMLprim value netsys_readlinkat(value dirfd, value path)
 {
 #ifdef HAVE_AT
-  char buffer[PATH_MAX];
-  int len;
-  len = readlinkat(Int_val(dirfd), String_val(path), buffer, sizeof(buffer)-1);
-  if (len == -1) uerror("readlinkat", path);
+  char *buffer;
+  int buflen, len;
+  struct stat sb;
+  value ret;
+  if (lstat(String_val(path), &sb) == -1) {
+    buflen = sb.st_size + 1;
+  }
+  else {
+    buflen = 64;
+  }
+  while (1) {
+    buffer = malloc(buflen);
+    len = readlinkat(Int_val(dirfd), String_val(path), buffer, buflen-1);
+    if (len == -1) {
+      free(buffer);
+      uerror("readlinkat", path);
+    }
+    if (len < buflen-1)
+      break;
+    free(buffer);
+    buflen *= 2;
+  }
   buffer[len] = '\0';
-  return copy_string(buffer);
+  ret = copy_string(buffer);
+  free(buffer);
+  return ret;
 #else
     invalid_argument("Netsys_posix.readlinkat not available");
 #endif

--- End Message ---
--- Begin Message ---
Source: ocamlnet
Source-Version: 4.1.8-1
Done: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>

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

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

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

Debian distribution maintenance software
pp.
Stéphane Glondu <glondu@debian.org> (supplier of updated ocamlnet 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@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 20 Aug 2020 13:12:23 +0200
Source: ocamlnet
Architecture: source
Version: 4.1.8-1
Distribution: unstable
Urgency: medium
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Changed-By: Stéphane Glondu <glondu@debian.org>
Closes: 844038
Changes:
 ocamlnet (4.1.8-1) unstable; urgency=medium
 .
   * New upstream release
   * Do not rely on PATH_MAX (Closes: #844038)
   * libocamlnet-ocaml-doc: add Multi-Arch: foreign
Checksums-Sha1:
 7e56103e05225f42927547aec7b0f7222d46ff4f 2565 ocamlnet_4.1.8-1.dsc
 48306f89f7cbd5826a9ec5c49514ea01046f7fc5 4620065 ocamlnet_4.1.8.orig.tar.gz
 5b48ede1f73cc4e53c04ac9386e5befced45b05c 16444 ocamlnet_4.1.8-1.debian.tar.xz
Checksums-Sha256:
 8343681d8c44607ff4e2599cf7a4015ce79731c8d366c05bc3e5fb7a936aad96 2565 ocamlnet_4.1.8-1.dsc
 d53a2f1612e41e65240e5f50dafb76bf6821a319b1c8699ddb366d8d651de0f4 4620065 ocamlnet_4.1.8.orig.tar.gz
 69f6a8f56b1f002497f4537f75aaf8090f0719892a6ea4f30159a8396dfb25c8 16444 ocamlnet_4.1.8-1.debian.tar.xz
Files:
 a8b2dedb0b3a6e0dd29872d56ad9c8c8 2565 ocaml optional ocamlnet_4.1.8-1.dsc
 0a76da5734e1861175f575c4e4ed3896 4620065 ocaml optional ocamlnet_4.1.8.orig.tar.gz
 5448bec6242e841cf4293e7faa5ccd80 16444 ocaml optional ocamlnet_4.1.8-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEbeJOl+yohsxW5iUOIbju8bGJMIEFAl8+WroACgkQIbju8bGJ
MIEROwgAoOtVJpK1sygS+zwwJXyvNrs5RNeWnoBEQfn4WrTKTi5K8BypXgFO0qJc
BP4IJJSHAUGQyyYM8243lgK80A1bAk56LFQBxUnyknQJbmUnDqHKOc0bSWo+ITEe
OSOvwlGtcVCxAguPZutvnx3YHET20nZ9RkiLZ/OqVrM0SXNxPxhtF57TO5o/SZ6c
c5BHgj1Pahko11fzPN7wGlsmFnBakV/qrTzdvtotrkvOJDnjZQbBF8Buff0Lua4w
PaeZ2AulRHyOF49UZIQZ8xW5ByT4+fHLGACzwe8UIlqHblCdShq7NKg9fjL3g7V+
q0c538phgQxvuaHz0TARpf6EaccdOg==
=tkon
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: