summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Don't smooth images when scaling up (bug#38394)Alan Third2020-08-04
| | | | | | | | | * src/image.c (image_set_transform [HAVE_XRENDER]): Use different filter when scaling up vs scaling down. * src/nsimage.m (ns_image_set_smoothing): ([EmacsImage setSmoothing:]): New functions. * src/nsterm.h: Add definitions. * src/nsterm.m (ns_dumpglyphs_image): Disable smoothing if requested.
* Drop support for -fcheck-pointer-boundsPaul Eggert2020-08-04
| | | | | | | | | | | GCC has removed the -fcheck-pointer bounds option, and the Linux kernel has also removed support for Intel MPX, so there’s no point to keeping this debugging option within Emacs. * src/bytecode.c (BYTE_CODE_THREADED): * src/lisp.h (DEFINE_LISP_SYMBOL, XSYMBOL, make_lisp_symbol): Assume __CHKP__ is not defined. * src/ptr-bounds.h: Remove. All uses of ptr_bounds_clip, ptr_bounds_copy, ptr_bounds_init, ptr_bounds_set removed.
* Use void * for pointers in with_echo_area_bufferPaul Eggert2020-08-03
| | | | | | | * src/xdisp.c (with_echo_area_buffer): Pass void * instead of ptrdiff_t, since the values are typically pointers and this ports better to (mostly-theoretical) hosts where ptrdiff_t is narrower than intptr_t. All uses changed.
* Ignore another memory leakPaul Eggert2020-08-03
| | | | | * src/pdumper.c (dump_mmap_contiguous_heap): Ignore the heap control block when checking for leaks.
* Simplify use of __lsan_ignore_objectPaul Eggert2020-08-03
| | | | | | | | | * configure.ac: Use AC_CHECK_FUNCS_ONCE for __lsan_ignore_object. * src/buffer.c, src/data.c, src/emacs-module.c, src/regex-emacs.c: * src/search.c: Use __lsan_ignore_object unconditionally, and don’t include sanitizer/lsan_interface.h. * src/lisp.h (__lsan_ignore_object): Provide a dummy in the typical case where leak sanitization is not available.
* Simplify pointer computation in mark_maybe_objectPaul Eggert2020-08-03
| | | | | | | | * src/alloc.c (mark_maybe_object): Use simpler way to avoid -fsanitize=undefined false alarms, by converting the word tag to intptr_t first. Omit now-unnecessary runtime overflow check. (mark_memory): Work even if UINTPTR_MAX <= INT_MAX (!).
* Merge from origin/emacs-27Glenn Morris2020-08-03
|\ | | | | | | | | | | | | | | | | | | | | | | 8576297b2a (origin/emacs-27) ; lisp/so-long.el: Prevent potential err... 986c12b20f ; * lisp/so-long.el: Byte-compilation bug fix 19f8f36f11 ; * lisp/so-long.el (so-long-variable-overrides): Improve doc 83bc4ad369 ; * so-long.el: Documentation and spelling 72c5f71cd4 Avoid segfaults if XIM is set but not xim_styles f54ddb0198 (emacs-27) ; * test/lisp/emacs-lisp/generator-tests.el: St... # Conflicts: # test/lisp/emacs-lisp/generator-tests.el
| * Avoid segfaults if XIM is set but not xim_stylesGrégory Mounié2020-08-02
| | | | | | | | | | | | | | | | | | Emacs segfaults at the X11 initialization if XIM is set and xim_styles is NULL. This patch avoids the crash. * src/xfns.c: Check also if FRAME_X_XIM_STYLES(f) is NULL. (Bug#42676) (Bug#42673) (Bug#42677) Copyright-paperwork-exempt: yes
| * Backport: Make checking for liveness of global values more precise.Philipp Stephani2020-07-31
| | | | | | | | | | | | | | | | | | | | We can't just use a hash lookup because a global and a local reference might refer to the same Lisp object. * src/emacs-module.c (module_free_global_ref): More precise check for global liveness. (cherry picked from commit 9f01ce6327af886f26399924a9aadf16cdd4fd9f)
| * Backport: Fix subtle bug when checking liveness of module values.Philipp Stephani2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | We can't simply look up the Lisp object in the global reference table because an invalid local and a valid global reference might refer to the same object. Instead, we have to test the address of the global reference against the stored references. * src/emacs-module.c (module_global_reference_p): New helper function. (value_to_lisp): Use it. (cherry picked from commit 6355a3ec62f43c9b99d483982ff851d32dd78891)
| * Backport: Fix memory leak for global module objects (Bug#42482).Philipp Stephani2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing the global values in a global 'emacs_value_storage' object, store them as hash values alongside the reference counts. That way the garbage collector takes care of cleaning them up. * src/emacs-module.c (global_storage): Remove. (struct module_global_reference): New pseudovector type. (XMODULE_GLOBAL_REFERENCE): New helper function. (module_make_global_ref, module_free_global_ref): Use 'module_global_reference' struct for global reference values. (value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of 'global_storage'. (cherry picked from commit 5c5eb9790898e4ab10bcbbdb6871947ed3018569)
* | Fix last change in 'try_window'Eli Zaretskii2020-08-03
| | | | | | | | | | * src/xdisp.c (try_window): Don't modify the logic when EOB is in the viewport. (Bug#42653)
* | Fix problem where TLS connections would sometimes hangDerek Zhou2020-08-03
| | | | | | | | | | | | | | | | | | | | * src/process.c (wait_reading_process_output): Before the select, check every interesting gnutls stream for available data in the buffer. If some of them hit, and either there is no wait_proc or the wait_proc is one of the gnutls streams with new data, set the select timeout to 0 after the select, and merge the gnutls buffer status into the select returns (bug#40665). This fixes a problem where TLS connections would sometimes hang.
* | Re-enable scroll-margin when cursor-motion optimization is disabledEli Zaretskii2020-08-02
| | | | | | | | | | | | * src/xdisp.c (try_window): Fix logic of disabling margins when cursor is close to BOB or EOB. Account for header-line, if any, when computing the scroll margin in pixels. (Bug#42653)
* | * src/alloc.c (mark_maybe_object): Avoid signed integer overflowPhilipp Stephani2020-08-02
| |
* | Fix last change in alloc.c.Eli Zaretskii2020-08-02
| | | | | | | | | | * src/alloc.c (mark_maybe_object) [WIDE_EMACS_INT]: Avoid compiler warning about 'overflow' being unused.
* | * src/alloc.c (mark_memory): Avoid signed integer overflowPhilipp Stephani2020-08-02
| |
* | * src/alloc.c (mark_maybe_object): Make overflow check conditional.Philipp Stephani2020-08-01
| |
* | Improve offset calculation in wide int buildsPhilipp Stephani2020-08-01
| | | | | | | | | | * src/alloc.c (mark_maybe_object): Make sure that OFFSET isn’t widened during subtraction.
* | * src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)Philipp Stephani2020-08-01
| |
* | Recreate macOS color list if it is corruptAlan Third2020-08-01
| | | | | | | | | | * src/nsterm.m (ns_term_init): Generate the color list if there are less colors in the existing file than in rgb.txt.
* | Use a more precise check for '__lsan_ignore_object'Philipp Stephani2020-08-01
| | | | | | | | | | | | | | | | | | | | * configure.ac: Add check for __lsan_ignore_object. * src/buffer.c (enlarge_buffer_text): * src/data.c (make_blv): * src/emacs-module.c (Fmodule_load, initialize_environment): * src/regex-emacs.c (regex_compile): * src/search.c (newline_cache_on_off): Use new configuration macro.
* | Suppress sanitizer errors about pointer arithmetic in a few placesPhilipp Stephani2020-08-01
| | | | | | | | | | | | | | | | | | | | We perform weird pointer arithmetic due to the layout of Lisp_Objects holding symbols. ASan/UBSan warns about that (Bug#42530). Suppress the warnings by performing the arithmetic on integer types and casting back to pointers. * src/alloc.c (mark_maybe_object, mark_memory): Temporarily cast pointer to 'intptr_t'.
* | Suppress leak sanitizer in a few more placesPhilipp Stephani2020-08-01
| | | | | | | | | | * src/regex-emacs.c (regex_compile): src/search.c (newline_cache_on_off): Suppress leak sanitizer.
* | Fix last changeEli Zaretskii2020-08-01
| | | | | | | | | | | | | | * src/emacs-module.c (initialize_environment): Call __lsan_ignore_object only if HAVE_SANITIZER_LSAN_INTERFACE_H is undefined. This fixes compilation on systems that don't have __lsan_* functions.
* | Suppress leak detector in some casesPhilipp Stephani2020-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We intentionally leak some objects. Prevent the ASan leak detector from raising false alarms in these cases. * configure.ac: Search for lsan_interface.h header. * src/data.c (make_blv): Allow leaking of buffer-local values. * src/buffer.c (enlarge_buffer_text): Allow leaking of buffer text. * src/emacs-module.c (Fmodule_load, initialize_environment): Allow intentional leak of runtime and environment objects if module assertions are enabled.
* | Update from GnulibPaul Eggert2020-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-07-30 work around some Oracle Studio attribute bugs 2020-07-29 fsusage, regex, stat-size: remove Cray support 2020-07-26 inttypes: remove support for AIX 4 2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0 2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS 2020-07-26 alloca: remove Cray-2 and Cray Y-MP support 2020-07-26 libgmp: remove dependency on havelib 2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP 2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11 2020-07-25 sigprocmask: small autoconf macro improvement 2020-07-25 small autoconf macro improvements 2020-07-24 timespec: remove dependence on ‘verify’ 2020-07-24 optimize a few more three-valued comparisons 2020-07-24 fix _GL_CMP parenthesization typo 2020-07-23 optimize three-valued comparison between integers 2020-07-24 doc: update for Mac OS X 10.13 2020-07-23 fchmodat, lchmod: use /proc on Cygwin 2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows 2020-07-12 libgmp: avoid warning when --without-libgmp is used 2020-07-12 libgmp: link to the correct shared library * lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for * build-aux/config.guess, build-aux/config.sub: * build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c: * lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c: * lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c: * lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h: * m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4: * m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4: * m4/multiarch.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/Makefile.in, test/Makefile.in (LIBGMP): Rename from LIB_GMP for compatibility with Gnulib. All uses changed.
* | Port to Oracle Studio 12.6 (sparc)Paul Eggert2020-07-30
| | | | | | | | | | | | | | | | * src/alloc.c (__builtin_unwind_init) [!HAVE___BUILTIN_UNWIND_INIT]: Move from here ... * src/lisp.h: ... to here, since flush_stack_call_func uses it. * src/pdumper.c (dump_off_from_lisp): Avoid ‘return n;;’ to pacify Oracle Studio.
* | Fix face extension past EOL in overlay stringsEli Zaretskii2020-07-30
| | | | | | | | | | | | | | | | | | | | * src/xdisp.c (face_at_pos): Pass ATTR_FILTER to face_for_overlay_string. * src/xfaces.c (face_for_overlay_string): Accept an additional argument ATTR_INDEX and pass it to merge_face_ref for merging the face at POS. This ensures a face from buffer text will not be merged unless it specifies the :extend attribute. (Bug#42552) * src/dispextern.h (face_for_overlay_string): Adjust prototype.
* | Merge from origin/emacs-27Glenn Morris2020-07-29
|\| | | | | | | | | | | 4b3085a7fe Fix last change efdd4632c9 Fix Arabic shaping when column-number-mode is in effect d5acc50941 Fix description of kmacro-* commands in the user manual
| * Fix last changeEli Zaretskii2020-07-25
| | | | | | | | | | * src/composite.c (composition_reseat_it): Fix of the commentary, and a minor change of the last fix.
| * Fix Arabic shaping when column-number-mode is in effectPip Cet2020-07-25
| | | | | | | | | | | | | | | | * src/indent.c (scan_for_column, compute_motion): Pass -1, instead of NEUTRAL_DIR, to 'composition_reseat_it'. * src/composite.c (composition_reseat_it): Interpret negative value of BIDI_LEVEL to mean the caller doesn't know what is the bidi direction of the text. (Bug#41005)
* | Fix uses of deprecated SELinux security_context_tBasil L. Contovounesios2020-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SELinux has used 'char *' in place of its typedef 'security_context_t' since 2014 (v2.3) because the latter was inconvenient to use when paired with the 'const' qualifier. The typedef has been kept around for compatibility with legacy callers, but it is deprecated in SELinux v3.1. See the following URL for the relevant announcement: https://lore.kernel.org/selinux/20200710162034.GC1768200@localhost.localdomain/ * src/fileio.c (Fcopy_file, Ffile_selinux_context) (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Replace deprecated 'security_context_t' typedef with the equivalent 'char *'.
* | Small refactoring to simplify the interface of internal function.Philipp Stephani2020-07-26
| | | | | | | | | | * src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter. (lisp_to_value): Adapt caller.
* | Make checking for liveness of global values more precise.Philipp Stephani2020-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't just use a hash lookup because a global and a local reference might refer to the same Lisp object. * src/emacs-module.c (module_free_global_ref): More precise check for global liveness. * test/data/emacs-module/mod-test.c (Fmod_test_globref_invalid_free): New test module function. (emacs_module_init): Export it. * test/src/emacs-module-tests.el (module--test-assertions--globref-invalid-free): New unit test.
* | Fix subtle bug when checking liveness of module values.Philipp Stephani2020-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't simply look up the Lisp object in the global reference table because an invalid local and a valid global reference might refer to the same object. Instead, we have to test the address of the global reference against the stored references. * src/emacs-module.c (module_global_reference_p): New helper function. (value_to_lisp): Use it. * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store_copy): New test module function. (emacs_module_init): Export it. * test/src/emacs-module-tests.el (module--test-assertions--load-non-live-object-with-global-copy): New unit test.
* | Fix memory leak for global module objects (Bug#42482).Philipp Stephani2020-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing the global values in a global 'emacs_value_storage' object, store them as hash values alongside the reference counts. That way the garbage collector takes care of cleaning them up. * src/emacs-module.c (global_storage): Remove. (struct module_global_reference): New pseudovector type. (XMODULE_GLOBAL_REFERENCE): New helper function. (module_make_global_ref, module_free_global_ref): Use 'module_global_reference' struct for global reference values. (value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of 'global_storage'.
* | Merge from origin/emacs-27Glenn Morris2020-07-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd93debc60 (origin/emacs-27) Merge branch 'emacs-27' of git.savannah.... 2c0c613ec5 Document prefix arg effects for 'epa-mail-{sign,encrypt}' 551123e0b2 * etc/NEWS: Correct description of :client-certificate change 05c4329cf5 Revert "Fix filename completion in shell mode buffers" de68572742 Improve documentation of 'bookmark-bmenu-mode' fd85e70be7 Update systems using GnuTLS certificate files 0d4ba1c2b2 Improve documentation of 'kill-emacs' b3bbd4fd00 Improve documentation of 'display-raw-bytes-as-hex' f50d79af6b Correct descriptions of init file e325d2638c Fix interrupt-process on MS-Windows d24e56a5e4 Revert "* doc/misc/flymake.texi (An annotated example back... # Conflicts: # etc/NEWS
| * Improve documentation of 'kill-emacs'Eli Zaretskii2020-07-17
| | | | | | | | | | | | * doc/lispref/os.texi (Killing Emacs): * src/emacs.c (Fkill_emacs): Document what non-integer, non-string argument to 'kill-emacs' means. (Bug#42400)
| * Fix interrupt-process on MS-WindowsEli Zaretskii2020-07-16
| | | | | | | | | | | | | | * src/w32proc.c (sys_kill): Test the status of the left Ctrl key for the purpose of restoring it after simulating Ctrl-C. This avoids leaving the left Ctrl key status in depressed state when the user actually pressed the right Ctrl key. (Bug#42350)
* | Don't message complete GIF data upon errorsLars Ingebrigtsen2020-07-17
| | | | | | | | | | | | * src/image.c (gif_load): When unable to parse a GIF specified via a data attribute, don't message the complete binary, because that's not useful (bug#40850).
* | Merge from origin/emacs-27Glenn Morris2020-07-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | c04b92104c Add commentary in gtkutil.c 6290850dac Consistently stylize eldoc as ElDoc in prose 136e931189 Improve documentation of "C-u C-x =" 1f52771fd3 Mention floating rounding issues c892ae65b4 Repair global-auto-revert-ignore-modes (bug#42271) 3a446a02fb ; * src/xdisp.c (decode_mode_spec): Fix commentary. 79f381b4a6 One more improvement of left/right-fringe display spec docs 1279bdb072 Another clarification of left/right-fringe display spec # Conflicts: # doc/emacs/programs.texi
| * Add commentary in gtkutil.cEli Zaretskii2020-07-11
| | | | | | | | | | * src/gtkutil.c: Add a comment regarding the incompatibilities vis-a-vis GTK. Suggested by Richard Stallman <rms@gnu.org>.
| * ; * src/xdisp.c (decode_mode_spec): Fix commentary.Eli Zaretskii2020-07-08
| |
* | Use Gnulib libgmp modulePaul Eggert2020-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of doing GMP by hand, use the Gnulib libgmp module. * .gitignore: Add lib/gmp.h. * admin/merge-gnulib (GNULIB_MODULES): Add libgmp. * configure.ac (GMP_LIB, GMP_OBJ): Remove. Gnulib uses the name LIB_GMP, so all uses changed. All uses of GMP_OBJ removed. (HAVE_GMP): Set this from Gnulib’s variables. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/mini-gmp-gnulib.c, lib/mini-gmp.c, lib/mini-gmp.h, m4/libgmp.m4: New files, copied from Gnulib. * src/bignum.h, test/data/emacs-module/mod-test.c: Include gmp.h unconditionally. * src/mini-gmp-emacs.c, src/mini-gmp.c, src/mini-gmp.h: Remove. This moves these files from src to lib, and updates them to the current GMP version. * test/Makefile.in (GMP_H): New macro. ($(test_module)): Use it to decide whether to compile mini-gmp-gnulib.c too.
* | Special-case symbol and fixnum keys in member, assoc and rassocMattias Engdegård2020-07-08
| | | | | | | | | | | | * src/fns.c (Fmember, Fassoc, Frassoc): Delegate to the cheaper Fmemq, Fassq and Frassq for arguments of the appropriate types. (eq_comparable_value): New function.
* | Merge from origin/emacs-27Glenn Morris2020-07-07
|\| | | | | | | | | | | | | 71fc003860 (origin/emacs-27) Avoid infloop in 'format-mode-line' 247dcb4b1b Clarify the documentation of 'left/right-fringe' display spec d453cee177 Minor improvement in ELisp manual 3c778c443c * doc/misc/tramp.texi (Customizing Methods): Fix typo.
| * Avoid infloop in 'format-mode-line'Eli Zaretskii2020-07-07
| | | | | | | | | | * src/xdisp.c (decode_mode_spec): Don't use W->start if it is outside of the buffer's accessible region. (Bug#42220)
* | Merge from origin/emacs-27Glenn Morris2020-07-07
|\| | | | | | | | | | | | | | | 59e768d64a Fix undefined behavior in json.c (Bug#42113) cce00bef03 Fix ACTION argument of 'display-buffer' call in gud.el 0121db2702 * src/keyboard.c (Fclear_this_command_keys): Doc fix. b9abf5ceb2 Improve do string of 'man' b87fc938a0 ; * src/xdisp.c (pos_visible_p): Yet another minor fix for...
| * Fix undefined behavior in json.c (Bug#42113)Philipp Stephani2020-06-29
| | | | | | | | | | | | | | | | * src/json.c (lisp_to_json_toplevel_1, Fjson_parse_string): Check whether input strings are actually strings. * test/src/json-tests.el (json-parse-string/wrong-type) (json-serialize/wrong-hash-key-type): New regression tests.