From 5420a0c6716310e90e73db8d446009bda5b4b164 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Thu, 23 Jun 2016 18:01:49 +0300 Subject: [PATCH 1/2] Fix ptr decompression for probe strtable variant --- src/duk_debugger.c | 2 +- src/duk_heap_markandsweep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duk_debugger.c b/src/duk_debugger.c index 43d78c5a..623ca63a 100644 --- a/src/duk_debugger.c +++ b/src/duk_debugger.c @@ -1786,7 +1786,7 @@ DUK_LOCAL void duk__debug_dump_strtab_probe(duk_hthread *thr, duk_heap *heap) { for (i = 0; i < heap->st_size; i++) { #if defined(DUK_USE_HEAPPTR16) - h = DUK_USE_HEAPPTR_DEC16(heap->strtable16[i]); + h = DUK_USE_HEAPPTR_DEC16(heap->heap_udata, heap->strtable16[i]); #else h = heap->strtable[i]; #endif diff --git a/src/duk_heap_markandsweep.c b/src/duk_heap_markandsweep.c index 30e3c0ab..cc0d4e9a 100644 --- a/src/duk_heap_markandsweep.c +++ b/src/duk_heap_markandsweep.c @@ -648,7 +648,7 @@ DUK_LOCAL void duk__sweep_stringtable_probe(duk_heap *heap, duk_size_t *out_coun for (i = 0; i < heap->st_size; i++) { #if defined(DUK_USE_HEAPPTR16) - h = (duk_hstring *) DUK_USE_HEAPPTR_DEC16(heap->strtable16[i]); + h = (duk_hstring *) DUK_USE_HEAPPTR_DEC16(heap->heap_udata, heap->strtable16[i]); #else h = heap->strtable[i]; #endif From 2344e7bed9c977d0f11bca3dfa84a9c2ecd2324f Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 24 Jun 2016 05:41:52 +0300 Subject: [PATCH 2/2] Releases: string table pointer compression fix --- RELEASES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASES.rst b/RELEASES.rst index 1dfb0eba..536a0db3 100644 --- a/RELEASES.rst +++ b/RELEASES.rst @@ -1703,6 +1703,10 @@ Planned allocator which supports runtime resizing of pool counts to specified memory target and realloc shrinking (GH-847) +* Fix compilation error triggered when using pointer compression and the + default string table implementation (probe-based rather than chained) + (GH-850) + * Fix a harmless compilation warning related to a shadowed variable (GH-793, GH-794)