[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 41/58: linker: Don't rely on out-of-range bv-ref excepti
From: |
Andy Wingo |
Subject: |
[Guile-commits] 41/58: linker: Don't rely on out-of-range bv-ref exceptions. |
Date: |
Tue, 7 Aug 2018 06:58:36 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit bab01b46edeec71ed1391a44d715741b418df0b0
Author: Ludovic Courtès <address@hidden>
Date: Thu Jun 28 17:14:08 2018 +0200
linker: Don't rely on out-of-range bv-ref exceptions.
* module/system/vm/linker.scm (find-shstrndx): Check whether NAME is
lower than the length of BV; remove 'false-if-exception' around
'string-table-ref' call.
---
module/system/vm/linker.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/system/vm/linker.scm b/module/system/vm/linker.scm
index 6ad582a..80c3dcf 100644
--- a/module/system/vm/linker.scm
+++ b/module/system/vm/linker.scm
@@ -1,6 +1,6 @@
;;; Guile ELF linker
-;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2012, 2013, 2014, 2018 Free Software Foundation, Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -478,8 +478,8 @@ section index."
(bv (linker-object-bv object))
(name (elf-section-name section)))
(and (= (elf-section-type section) SHT_STRTAB)
- (equal? (false-if-exception (string-table-ref bv name))
- ".shstrtab")
+ (< name (bytevector-length bv))
+ (string=? (string-table-ref bv name) ".shstrtab")
(elf-section-index section))))
objects))
- [Guile-commits] 24/58: Add copyright header for (language elisp falias), and fix typo., (continued)
- [Guile-commits] 24/58: Add copyright header for (language elisp falias), and fix typo., Andy Wingo, 2018/08/07
- [Guile-commits] 29/58: get-bytevector-n and get-bytevector-n! can now read more than 4 GB, Andy Wingo, 2018/08/07
- [Guile-commits] 26/58: tests: Add SRFI-71 test., Andy Wingo, 2018/08/07
- [Guile-commits] 34/58: Add 'scm_to_stringn' shortcut when converting to UTF-8., Andy Wingo, 2018/08/07
- [Guile-commits] 12/58: srfi-18: When timeout is a number, it's a relative number of seconds., Andy Wingo, 2018/08/07
- [Guile-commits] 22/58: Fix error reporting in 'load-thunk-from-memory'., Andy Wingo, 2018/08/07
- [Guile-commits] 19/58: Fix type inference for bitwise logical operators., Andy Wingo, 2018/08/07
- [Guile-commits] 23/58: elisp: Fix cross-compilation support., Andy Wingo, 2018/08/07
- [Guile-commits] 33/58: Module import obarrays are accessed in a critical section., Andy Wingo, 2018/08/07
- [Guile-commits] 38/58: GDB support: Fix 'display-vm-frames'., Andy Wingo, 2018/08/07
- [Guile-commits] 41/58: linker: Don't rely on out-of-range bv-ref exceptions.,
Andy Wingo <=
- [Guile-commits] 40/58: GDB support: Add 'guile-backtrace' command., Andy Wingo, 2018/08/07
- [Guile-commits] 27/58: Make module autoloading thread-safe., Andy Wingo, 2018/08/07
- [Guile-commits] 51/58: compile: Improve error message., Andy Wingo, 2018/08/07
- [Guile-commits] 28/58: vm: Fix typo when checking for 'madvise' error code., Andy Wingo, 2018/08/07
- [Guile-commits] 30/58: doc: Fix typo., Andy Wingo, 2018/08/07
- [Guile-commits] 36/58: vm: Fix another typo., Andy Wingo, 2018/08/07
- [Guile-commits] 32/58: tests: Adjust i18n.test to 'fr_FR.utf8' locale in glibc 2.27., Andy Wingo, 2018/08/07
- [Guile-commits] 39/58: GDB support: Add note about (gdb frame-filters)., Andy Wingo, 2018/08/07
- [Guile-commits] 31/58: doc: Document (ice-9 match) macros., Andy Wingo, 2018/08/07
- [Guile-commits] 49/58: r6rs-ports: Accept 'port-position' values greater than 2^32., Andy Wingo, 2018/08/07