summaryrefslogtreecommitdiff
path: root/lisp/org/ob-gnuplot.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-06-21 11:45:05 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-06-21 12:18:56 -0700
commitac1ceadce8916ac71c8d549b66631d499077494d (patch)
treecae7d50bf7e028da328458b815e44d2314ce8da8 /lisp/org/ob-gnuplot.el
parent1de9e2986ca25d8153681e9fab19199a00021b05 (diff)
downloademacs-ac1ceadce8916ac71c8d549b66631d499077494d.tar.gz
emacs-ac1ceadce8916ac71c8d549b66631d499077494d.tar.bz2
emacs-ac1ceadce8916ac71c8d549b66631d499077494d.zip
Fix temacs hybrid_malloc core dump
Without this patch, ./temacs would dump core sometimes on Fedora 25 x86-64. The problem was that the hybrid allocator assumed that all pointers into bss_sbrk_buffer are allocated via gmalloc. This assumption is not true on Fedora, because the standard memory allocator calls gdefault_morecore, which means its blocks are interleaved with our blocks. Usually the code happened to work, because our data structures agreed with the glibc data structures, but this was merely luck due to a shared pedigree, and as glibc mutates our luck has run out. * src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [HYBRID_MALLOC]: Remove; no longer needed. (BLOCK): Use unsigned division, as that does the right thing near zero. (register_heapinfo, __malloc_internal_nolock, __free_internal_nolock) (_realloc_internal_nolock): Big blocks now have type -1, not 0, as 0 now means the block is not ours. (morecore_nolock): Omit now-unnecessary casts to size_t. (allocated_via_gmalloc) [HYBRID_MALLOC]: New function. (hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: Use it, to avoid calling the wrong free or realloc function in some cases.
Diffstat (limited to 'lisp/org/ob-gnuplot.el')
0 files changed, 0 insertions, 0 deletions