1. 10 Jun, 2019 1 commit
  2. 06 May, 2019 1 commit
  3. 01 Jan, 2019 1 commit
  4. 08 Aug, 2018 1 commit
    • Lars Ingebrigtsen's avatar
      Make async :family 'local failures fail correctly again · 18588bce
      Lars Ingebrigtsen authored
      * src/fileio.c (get_file_errno_data): Refactor out into its own
      function so that we can reuse the error handling from an async
      context (bug#31901).
      * src/process.c (connect_network_socket): When an async :family
      'local client fails (with a file error, for instance), mark the
      process as failed.
      (cherry picked from commit 92ba34d8)
  5. 29 Jun, 2018 1 commit
  6. 03 Jun, 2018 3 commits
    • Stefan Monnier's avatar
      Fix bug#30846, along with misc cleanups found along the way · ed962f2b
      Stefan Monnier authored
      * test/src/data-tests.el (data-tests-kill-all-local-variables): New test.
      * src/buffer.c (swap_out_buffer_local_variables): Remove.
      Fuse the body of its loop into that of reset_buffer_local_variables.
      (Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
      (reset_buffer_local_variables): Make sure the buffer's local binding
      is swapped out before removing it from the alist (bug#30846).
      Call watchers before actually killing the var.
      * src/data.c (Fmake_local_variable): Simplify.
      Use swap_in_global_binding to swap out any local binding, instead of
      a mix of find_symbol_value followed by messing with where&found.
      Don't call swap_in_symval_forwarding since the currently swapped
      binding is never one we've modified.
      (Fkill_local_variable): Use swap_in_global_binding rather than messing
      with where&found to try and trick find_symbol_value into doing the same.
      * src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.
      (cherry picked from commit 3ddff080)
    • Paul Eggert's avatar
      Centralize Bug#30931 fix · 51ee8bc4
      Paul Eggert authored
      * src/marker.c (detach_marker): New function.
      * src/editfns.c (save_restriction_restore):
      * src/insdel.c (signal_before_change): Use it.
      (cherry picked from commit 6f66a43d)
    • Noam Postavsky's avatar
      Fix another case of freed markers in the undo-list (Bug#30931) · daa60233
      Noam Postavsky authored
      * src/alloc.c (free_marker): Remove.
      * src/editfns.c (save_restriction_restore):
      * src/insdel.c (signal_before_change): Detach the markers from the
      buffer when we're done with them instead of calling free_marker on
      * test/src/editfns-tests.el (delete-region-undo-markers-1)
      (delete-region-undo-markers-2): New tests.
      (cherry picked from commit 96b8747d)
  7. 23 Mar, 2018 1 commit
  8. 01 Jan, 2018 1 commit
  9. 26 Nov, 2017 1 commit
  10. 13 Nov, 2017 2 commits
    • Paul Eggert's avatar
      Use alignas to fix GCALIGN-related bugs · b1573a97
      Paul Eggert authored
      Use alignas and unions to specify alignments of objects needing
      addresses that are at least a multiple of GCALIGNMENT.  Using
      these standard C facilities should be safer than relying on ad hoc
      and poorly-understood features like GCC’s __attribute__
      ((aligned (N))), the root cause for recent porting bugs like
      Bug#29040.  The alignas macro was standardized by C11 and Gnulib
      supports alignas for pre-C11 platforms.  I have tested this on Sun
      Studio 12 sparc (2007) and GCC 4.4.7 x86-64 (2012) as well as on
      more recent platforms like GCC 7.2.1 (2017) on Fedora 26 (both
      x86-64 and x86).
      * lib-src/make-docfile.c (close_emacs_globals): lispsym is now
      just an array of struct Lisp_Symbol, since struct Lisp_Symbol is
      now properly aligned.  All uses changed.
      * src/alloc.c (NEXT_FREE_LISP_STRING): Just use the new u.next
      member; this is simpler and safer than casting a pointer that
      might not be aligned properly.
      (aligned_Lisp_Symbol): Remove.  No longer needed, now that struct
      Lisp_Symbol is aligned properly.  All uses replaced with struct
      * src/lisp.h (GCALIGNED): Remove, as it does not work as expected:
      it can cause the natural alignment to be ignored.  All uses
      replaced by unions with a ‘char alignas (GCALIGNMENT)’ member as
      described below.
      (struct Lisp_Symbol, struct Lisp_Cons, struct Lisp_String):
      Change definition from ‘struct TAG { MEMBERS };’ to
      ‘struct TAG { union { struct { MEMBERS } s; char alignas
      (GCALIGNMENT) gcaligned; } u; };’.  This guarantees ‘struct TAG’
      to have an alignment that at least max (GCALIGNMENT, N) where N is
      its old alignment.  All uses like ‘PTR->MEMBER’ changed to
      ‘PTR->u.s.MEMBER’; these uses were supposed to be mostly private
      anyway.  Verify that the resulting ‘struct TAG’ is properly
      aligned for Emacs.
      (union vectorlike_header): New member ‘gcaligned’ to guarantee
      that this type, and its containing types like ‘struct Lisp_Subr’,
      ‘struct buffer’ and ‘struct thread_state’, are all properly
      aligned for Emacs.
      (struct Lisp_String): New union member ‘next’, for the benefit
      (union Aligned_Cons, union Aligned_String): Remove.  All uses
      replaced by struct Lisp_Cons and struct Lisp_String, since they
      are now properly aligned.
      (USE_STACK_CONS, USE_STACK_STRING): Simplify now that we can
      assume struct Lisp_Cons and struct Lisp_String are properly
    • Paul Eggert's avatar
      Change vectorlike from struct to union · 5d68dc9a
      Paul Eggert authored
      * src/lisp.h (vectorlike_headed): Change from struct to union.
      All uses changed.  Since it has only one member, this does not
      change semantics.  This is designed to simplify future changes
      needed to fix bugs like Bug#29040.  All uses changed.
  11. 09 Nov, 2017 1 commit
    • Paul Eggert's avatar
      Use GCALIGNED properly for GCC · 9e59de94
      Paul Eggert authored
      Apparently GCC requires that ‘__attribute__ ((aligned (8)))’ must
      immediately follow the ‘struct’ keyword when aligning a structure.
      The attribute silently does not work if it follows a tag after the
      ‘struct’ keyword.  Who knew?  Anyway, this patch is designed to
      fix a SIGSEGV problem reported by John Mastro (Bug#29183).
      * lib-src/make-docfile.c (close_emacs_globals):
      * src/buffer.c (buffer_defaults, buffer_local_symbols):
      * src/lisp.h (DEFUN):
      * src/thread.c (main_thread):
      Put 'GCALIGNED' immediately after 'struct'.
  12. 03 Nov, 2017 2 commits
  13. 02 Nov, 2017 1 commit
    • Paul Eggert's avatar
      Fix alignment portability problems · 6b08ad52
      Paul Eggert authored
      Do not assume that the natural alignment of Lisp objects is a
      multiple of GCALIGNMENT.  This improves on the portability of the
      recent fix for Bug#29040.
      * lib-src/make-docfile.c (close_emacs_globals):
      * src/buffer.c (buffer_defaults, buffer_local_symbols):
      * src/lisp.h (DEFUN):
      * src/thread.c (main_thread):
      Use GCALIGNED, not alignas (GCALIGNMENT).
      * src/alloc.c (COMMON_MULTIPLE):
      Move back here from lisp.h, since it is no longer used elsewhere.
      * src/lisp.h (GCALIGNMENT): No longer a macro, since we need not
      worry about MSVC.  Omit no-longer-needed consistency check.
      * src/thread.c (THREAD_ALIGNMENT): Remove.
  14. 28 Oct, 2017 1 commit
    • Eli Zaretskii's avatar
      Avoid segfaults in 64-bit Windows builds · 00c3c6d8
      Eli Zaretskii authored
      * src/lisp.h (COMMON_MULTIPLE): Move here from alloc.c.
      * src/thread.c (THREAD_ALIGNMENT): New macro.
      (main_thread): Use THREAD_ALIGNMENT to align propertly.  (Bug#29040)
  15. 04 Oct, 2017 2 commits
    • Paul Eggert's avatar
      Speed up (format "%s" STRING) and the like · 3db388b0
      Paul Eggert authored
      Although the Lisp manual said that ‘format’ returns a
      newly-allocated string, this was not true for a few cases like
      (format "%s" ""), and fixing the documentation to allow reuse of
      arguments lets us improve performance in common cases like
      (format "foo") and (format "%s" "foo") (Bug#28625).
      * doc/lispref/strings.texi (Formatting Strings):
      * etc/NEWS:
      Say that the result of ‘format’ might not be newly allocated.
      * src/callint.c (Fcall_interactively):
      * src/dbusbind.c (XD_OBJECT_TO_STRING):
      * src/editfns.c (Fmessage, Fmessage_box):
      * src/xdisp.c (vadd_to_log, Ftrace_to_stderr):
      Just use Fformat or Fformat_message, as that’s simpler and no
      longer makes unnecessary copies.
      * src/editfns.c (styled_format): Remove last argument, as it
      is no longer needed: all callers now want it to behave as if it
      were true.  All remaining callers changed.  Make this function
      static again.  Simplify the function now that we no longer
      need to worry about whether the optimization is allowed.
    • Eli Zaretskii's avatar
      Avoid crashes on C-g when several threads wait for input · ea39d470
      Eli Zaretskii authored
      * src/thread.h (m_getcjmp): New member of 'struct thread_state'.
      (getcjmp): Define to current thread's 'm_getcjmp'.
      * src/thread.c (maybe_reacquire_global_lock): Switch to main
      thread, since this is called from a SIGINT handler, which always
      runs in the context of the main thread.
      * src/lisp.h (sys_jmp_buf, sys_setjmp, sys_longjmp): Move the
      definitions before thread.h is included, as thread.h now uses
      * src/keyboard.c (getcjmp): Remove declaration.
      (read_char): Don't call maybe_reacquire_global_lock here.
      (handle_interrupt): Call maybe_reacquire_global_lock here, if
      invoked from the SIGINT handler, to make sure
      quit_throw_to_read_char runs with main thread's Lisp bindings and
      uses the main thread's jmp_buf buffer.  (Bug#28630)
  16. 02 Oct, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to HTTP for gnu.org · 5172fa02
      Paul Eggert authored
      This fixes some URLs I omitted from my previous pass,
      notably those in lists.gnu.org.  Although lists.gnu.org
      does not yet support TLS 1.1, TLS 1.0 is better than nothing.
      * lisp/erc/erc.el (erc-official-location):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      Use https:, not http:.
  17. 26 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Avoid some unnecessary copying in Fformat etc. · 0e82fa34
      Paul Eggert authored
      This patch is just for performance; it should not affect behavior.
      On my platform, it made the microbenchmark (format "%S" load-path)
      run about 45% faster.  It should also speed up calls like (message
      "%s" STRING).
      * src/callint.c (Fcall_interactively):
      * src/dbusbind.c (XD_OBJECT_TO_STRING):
      * src/editfns.c (Fmessage, Fmessage_box):
      * src/xdisp.c (vadd_to_log, Ftrace_to_stderr):
      Use styled_format instead of Fformat or Fformat_message,
      to avoid unnecessary copying.
      * src/editfns.c (styled_format): New arg NEW_RESULT.
      All uses changed.  Reuse an input string if it has the
      right value and if !NEW_RESULT.
      * src/lisp.h (style_format): New decl.
  18. 15 Sep, 2017 1 commit
    • Eli Zaretskii's avatar
      Avoid compilation warnings with GCC 7 on MS-Windows · 015172d1
      Eli Zaretskii authored
      * src/w32term.c (w32_setup_relief_color, construct_mouse_click)
      (w32_read_socket): Initialize variables to shut up bogus
      compilation warnings from GCC 7.
      * src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR
      to avoid compiler warnings about printing signed values using %x
      format spec.
      * src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid
      compiler warning about possible NULL pointer dereference.
      * src/lisp.h (pI): Tweak the definition some more for MinGW64.
  19. 14 Sep, 2017 1 commit
  20. 13 Sep, 2017 2 commits
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
    • Mark Oteiza's avatar
      Add lcms2 interface · 5d4c539b
      Mark Oteiza authored
      configure.ac: Add boilerplate for configuring and detecting liblcms2.
      etc/NEWS: Mention new configure option and color-distance change.
      src/Makefile.in: Add references to lcms.c and liblcms.
      src/emacs.c: Define lcms2 symbols.
      src/lcms.c: New file.
      src/lisp.h: Add declaration for lcms2.
      src/xfaces.c: Add optional METRIC argument.
  21. 25 Aug, 2017 1 commit
    • Paul Eggert's avatar
      Simplify expand_and_dir_to_file · 9a223dab
      Paul Eggert authored
      * src/fileio.c (expand_and_dir_to_file): Simplify by omitting 2nd
      argument, since in practice it always has the default value.  All
      callers changed.  Prefer C99 style decls in nearby code.
  22. 12 Aug, 2017 2 commits
    • Paul Eggert's avatar
      Improve make-temp-file performance on local files · a6ad98ad
      Paul Eggert authored
      For the motivation behind this patch, please see Bug#28023 and:
      Although, given the recent changes to Tramp, the related security
      problem in make-temp-file is already fixed, make-temp-file still has
      several unnecessary system calls.  In the typical case on GNU/Linux,
      this patch replaces 8 syscalls (symlink, open, close, readlinkat, uname,
      getpid, unlink, umask) by 2 (open, close).
      * admin/merge-gnulib (GNULIB_MODULES): Add tempname, now
      that Emacs is using it directly.
      * configure.ac (AUTO_DEPEND): Remove AC_SYS_LONG_FILE_NAMES;
      no longer needed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lisp/files.el (files--make-magic-temp-file): Rename from
      (make-temp-file): Use make-temp-file-internal for
      non-magic file names.
      * src/fileio.c: Include tempname.h.
      (make_temp_name_tbl, make_temp_name_count)
      (make_temp_name_count_initialized_p, make_temp_name): Remove.
      (Fmake_temp_file_internal): New function.
      (Fmake_temp_name): Use it.
      * src/filelock.c (get_boot_time): Use Fmake_temp_file_internal
      instead of make_temp_name.
    • Michael Albinus's avatar
      Implement EXCL of write-region for Tramp · ec5cfaa4
      Michael Albinus authored
      * lisp/net/ange-ftp.el (ange-ftp-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region)
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region)
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      Implement MUSTBENEW.
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
      * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
      Adapt error message for `file-already-exists'.
      * src/lisp.h:
      * src/eval.c (call8): New function.
      * src/fileio.c (write_region): Pass also lockname and
      mustbenew to the file name handler.
      * test/lisp/net/tramp-tests.el (tramp-test10-write-region):
      Add tests for MUSTBENEW.
  23. 02 Aug, 2017 1 commit
    • Paul Eggert's avatar
      When renaming a file, ask only if EEXIST or ENOSYS · 1f9f514e
      Paul Eggert authored
      * src/fileio.c (Frename_file): Avoid calling Ffile_directory_p
      more than once on FILE.  Use renameat_noreplace, so that we can
      ask the user (and unlink and retry) only if this fails with errno
      == EEXIST or ENOSYS.  This avoids the need to ask the user for
      permission to do an operation that will fail anyway.  Simplify
      computation of ok_if_already_exists for subsidiary functions.
      * src/filelock.c (rename_lock_file): Prefer renameat_noreplace
      if it works, as this avoids the need to link and unlink.
      * src/lisp.h (renameat_noreplace): New decl.
      * src/sysdep.c [HAVE_LINUX_FS_H]: Include linux/fs.h and sys/syscall.h.
      (renameat_noreplace): New function.
  24. 24 Jul, 2017 1 commit
    • Andreas Schwab's avatar
      Properly align global lispsym · 7a4d9f63
      Andreas Schwab authored
      * lib-src/make-docfile.c (close_emacs_globals): Wrap struct
      Lisp_Symbols inside struct.
      * src/alloc.c (sweep_symbols): Update use of lispsym.
      * src/lisp.h (builtin_lisp_symbol): Likewise.
  25. 14 Jul, 2017 3 commits
    • Paul Eggert's avatar
      GnuTLS integer-overflow and style fixes · 05b8b866
      Paul Eggert authored
      This tweaks the recently-added GnuTLS improvements so that
      they avoid some integer-overflow problems and follow typical
      Emacs style a bit better.
      * configure.ac (HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
      (HAVE_GNUTLS3_CIPHER): Use AC_CACHE_CHECK so that the
      configure-time results are displayed.
      * src/fns.c (extract_data_from_object): Return char *, not char
      const *, since one gnutls caller wants a non-const pointer.  Use
      CONSP rather than !NILP when testing for conses.  Use CAR_SAFE
      instead of rolling our own code.  Prefer signed types to unsigned
      when either will do.  Report problems for lengths out of range,
      instead of silently mishandling them.
      * src/gnutls.c (emacs_gnutls_strerror): New function, to simplify
      callers.  All callers of gnutls_sterror changed.
      (Fgnutls_boot): Check for integers out of range rather than
      silently truncating them.
      (gnutls_symmetric_aead): Check for integer overflow in size
      (gnutls_symmetric_aead, Fgnutls_macs, Fgnutls_digests):
      Prefer signed to unsigned integers where either	will do.
      (gnutls_symmetric_aead, gnutls_symmetric):
      Work even if ptrdiff_t is wider than ‘long’.
      (gnutls_symmetric, Fgnutls_hash_mac, Fgnutls_hash_digest):
      Check for integer overflow in algorithm selection.
    • Ted Zlatanov's avatar
      GnuTLS HMAC and symmetric cipher support · 583995c6
      Ted Zlatanov authored
          * etc/NEWS: Add news for new feature.
          * doc/lispref/text.texi (GnuTLS Cryptography): Add
          * configure.ac: Add macros HAVE_GNUTLS3_DIGEST,
          * src/fns.c (Fsecure_hash_algorithms): Add function to list
          supported `secure-hash' algorithms.
          (extract_data_from_object): Add data extraction function that
          can operate on buffers and strings.
          (secure_hash): Use it.
          (Fsecure_hash): Mention `secure-hash-algorithms'.
          * src/gnutls.h: Include gnutls/crypto.h.
          * src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
          (gnutls_symmetric, Fgnutls_symmetric_encrypt, Fgnutls_symmetric_decrypt)
          (Fgnutls_macs, Fgnutls_digests, Fgnutls_hash_mac, Fgnutls_hash_digest)
          (Fgnutls_available_p): Implement GnuTLS cryptographic integration.
          * test/lisp/net/gnutls-tests.el: Add tests.
    • Paul Eggert's avatar
      Improve stack-overflow heuristic on GNU/Linux · 9dee1c88
      Paul Eggert authored
      Problem reported by Steve Kemp (Bug#27585).
      * src/eval.c (near_C_stack_top): Remove.  All uses replaced
      by current_thread->stack_top.
      (record_in_backtrace): Set current_thread->stack_top.
      This is for when the Lisp interpreter calls itself.
      * src/lread.c (read1): Set current_thread->stack_top.
      This is for recursive s-expression reads.
      * src/print.c (print_object): Set current_thread->stack_top.
      This is for recursive s-expression printing.
      * src/thread.c (mark_one_thread): Get stack top first.
      * src/thread.h (struct thread_state.stack_top): Now void *, not char *.
  26. 25 Jun, 2017 1 commit
    • Eli Zaretskii's avatar
      Allow to disable display of line numbers beyond EOB · 5d1025e7
      Eli Zaretskii authored
      * src/buffer.c (disable_line_numbers_overlay_at_eob): New
      * src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype.
      * src/xdisp.c (should_produce_line_number): When at ZV, call
      disable_line_numbers_overlay_at_eob to determine whether line
      numbers should be displayed beyond ZV.
  27. 12 Jun, 2017 3 commits
    • Philipp Stephani's avatar
      Implement module assertions for users · cf971327
      Philipp Stephani authored
      Add a new command-line option '-module-assertions' that users can
      enable developing or debugging a module.  If this option is present,
      Emacs performs additional checks to verify that modules fulfill their
      requirements.  These checks are expensive and crash Emacs if modules
      are invalid, so disable them by default.
      This is a command-line option instead of an ordinary variable because
      changing it while Emacs is running would cause data structure
      * src/emacs.c (main): New command line option '-module-assertions'.
      * src/emacs-module.c (module_assert_main_thread)
      (module_assert_runtime, module_assert_env, module_assert_value):
      New functions to assert module requirements.
      (syms_of_module): New uninterned variable 'module-runtimes'.
      (init_module_assertions, in_main_thread, module_abort): New helper
      (initialize_environment): Initialize value list.  If assertions are
      enabled, use a heap-allocated environment object.
      (finalize_environment): Add assertion that environment list is never
      (finalize_runtime_unwind): Pop module runtime object stack.
      (value_to_lisp): Assert that the value is valid.
      (lisp_to_value): Record new value if assertions are enabled.
      (mark_modules): Mark allocated object list.
      (module_non_local_exit_check, module_non_local_exit_clear)
      (module_non_local_exit_get, module_non_local_exit_signal)
      (module_non_local_exit_throw): Assert thread and environment.
      (module_get_environment): Assert thread and runtime.
      (module_make_function, module_funcall, module_intern)
      (module_funcall, module_make_integer, module_make_float)
      (module_make_string, module_make_user_ptr, module_vec_get)
      (funcall_module, Fmodule_load): Adapt callers.
      (module_make_global_ref): If assertions are enabled, use the global
      environment to store global values.
      (module_free_global_ref): Remove value from global value list.
      * test/Makefile.in (EMACSOPT): Enable module assertions when testing
      * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store)
      (Fmod_test_invalid_load): New functions to test module assertions.
      (emacs_module_init): Bind the new functions.
      * test/src/emacs-module-tests.el (mod-test-emacs): New constant for
      the Emacs binary file.
      (mod-test-file): New constant for the test module file name.
      (module--test-assertions): New unit test.
    • Paul Eggert's avatar
      Remove Lisp_Misc_Float · bb534f6a
      Paul Eggert authored
      * src/data.c (Ftype_of): Do not worry about Lisp_Misc_Float.
      * src/lisp.h (Lisp_Misc_Float): Remove.  This placeholder has been
      unused for two decades; if we ever want to change floats to be a
      misc type we can bring it back then.
    • Paul Eggert's avatar
      Make two symbols private to emacs-module.c · d0ff364f
      Paul Eggert authored
      * src/lisp.h (allocate_module_function, XSET_MODULE_FUNCTION):
      Move from here ...
      * src/emacs-module.c: ... to here.
  28. 08 Jun, 2017 1 commit
  29. 05 Jun, 2017 1 commit
    • Paul Eggert's avatar
      SCHARS and STRING_BYTES are nonnegative · cef90102
      Paul Eggert authored
      Tell the compiler that SCHARS and STRING_BYTES are nonnegative, in
      the hopes that this will optimize a bit better.  Also, check this
      at runtime if ENABLE_CHECKING.
      * src/lisp.h (SCHARS, STRING_BYTES):
      eassume that these functions return nonnegative values.
      eassert that newsize is nonnegative.