Euphoria Ticket #125: Invalid free inside double block

The new memory caching code is resulting in invalid frees on Linux (bad ifdefs?). Output from valgrind:

==9508== Invalid free() / delete / delete[] 
==9508==    at 0x4024836: free (vg_replace_malloc.c:325) 
==9508==    by 0x8268A9D: de_reference (be_runtime.c:1553) 
==9508==    by 0x8234A69: _34hashfn (symtab.c:194) 
==9508==    by 0x823F1F1: _34keyfind (symtab.c:6059) 
==9508==    by 0x81F3AE4: _54Scanner (scanner.c:10106) 
==9508==    by 0x81AA6BD: _57next_token (parser.c:4575) 
==9508==    by 0x81B0FB0: _57UFactor (parser.c:9338) 
==9508==    by 0x81B114F: _57Term (parser.c:9468) 
==9508==    by 0x81B1418: _57aexpr (parser.c:9597) 
==9508==    by 0x81B16BC: _57cexpr (parser.c:9722) 
==9508==    by 0x81B17BB: _57rexpr (parser.c:9829) 
==9508==    by 0x81B1B65: _57Expr (parser.c:10080) 
==9508==  Address 0x42396a8 is 1,328 bytes inside a block of size 16,384 alloc'd 
==9508==    at 0x4024C1C: malloc (vg_replace_malloc.c:195) 
==9508==    by 0x825EB59: new_dbl_block (be_alloc.c:932) 
==9508==    by 0x825EBC9: NewDouble (be_alloc.c:963) 
==9508==    by 0x815B33B: init_literal (init-.c:6606) 
==9508==    by 0x81738EB: main (main-.c:1134) 

Details

Type: Bug Report Severity: Blocking Category: Interpreter
Assigned To: DerekParnell Status: Fixed Reported Release: r3032
Fixed in SVN #: 3035 View VCS: 3035 Milestone:

1. Comment by DerekParnell Dec 30, 2009

The #define when using 'system memory' option is wrong for freeing doubles.

Search



Quick Links

User menu

Not signed in.

Misc Menu