Changes between Version 2 and Version 3 of Ticket #1899

Show
Ignore:
Timestamp:
12/22/10 21:10:40 (4 years ago)
Author:
bluescreen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1899 – description

    v2 v3  
    1 Around line 567, [[BR]] 
    2 [[BR]] 
     1Around line 567,  
     2 
     3{{{ 
    34    if (IMCC_INFO(interp)->error_code) {[[BR]] 
    45        char * const error_str = Parrot_str_to_cstring(interp, 
    5                                                    IMCC_INFO(interp)->error_message);[[BR]] 
     6                                                   IMCC_INFO(interp)->error_message); 
    67 
    7         IMCC_INFO(interp)->error_code=IMCC_FATAL_EXCEPTION;[[BR]] 
    8         fprintf(stderr, "error:imcc:%s", error_str);[[BR]] 
     8        IMCC_INFO(interp)->error_code=IMCC_FATAL_EXCEPTION; 
     9        fprintf(stderr, "error:imcc:%s", error_str); 
    910        IMCC_print_inc(interp);[[BR]] 
    10         Parrot_str_free_cstring(error_str);[[BR]] 
    11         Parrot_x_exit(interp, IMCC_FATAL_EXCEPTION);[[BR]] 
    12     }[[BR]] 
    13     imc_cleanup(interp, yyscanner);[[BR]] 
    14 [[BR]] 
     11        Parrot_str_free_cstring(error_str); 
     12        Parrot_x_exit(interp, IMCC_FATAL_EXCEPTION); 
     13    } 
     14    imc_cleanup(interp, yyscanner); 
     15 
     16}}} 
     17 
    1518In the error branch main.c is not calling imc_cleanup so valgrind gives the following output:[[BR]] 
    1619 
    17 ==4322== 222 (208 direct, 14 indirect) bytes in 1 blocks are definitely lost in loss record 238 of 508[[BR]] 
    18  
    19 ==4322==    at 0x4C27480: calloc (vg_replace_malloc.c:467)[[BR]] 
    20  
    21 ==4322==    by 0x4FB05F7: gc_ms2_allocate_memory_chunk_zeroed (gc_ms2.c:1410)[[BR]] 
    22  
    23 ==4322==    by 0x4FA9EC5: Parrot_gc_allocate_memory_chunk_with_interior_pointers (api.c:628)[[BR]] 
    24  
    25 ==4322==    by 0x50FEE0C: new_frame (imcc.l:752)[[BR]] 
    26  
    27 ==4322==    by 0x5100397: IMCC_push_parser_state (imcc.l:1263)[[BR]] 
    28  
    29 ==4322==    by 0x5102552: compile_to_bytecode (main.c:556)[[BR]] 
    30  
    31 ==4322==    by 0x51029C4: imcc_run (main.c:652)[[BR]] 
    32  
    33 ==4322==    by 0x401313: main (main.c:152)[[BR]] 
    34  
     20{{{ 
     21==4322== 222 (208 direct, 14 indirect) bytes in 1 blocks are definitely lost in loss record 238 of 508 
     22==4322==    at 0x4C27480: calloc (vg_replace_malloc.c:467) 
     23==4322==    by 0x4FB05F7: gc_ms2_allocate_memory_chunk_zeroed (gc_ms2.c:1410) 
     24==4322==    by 0x4FA9EC5: Parrot_gc_allocate_memory_chunk_with_interior_pointers (api.c:628) 
     25==4322==    by 0x50FEE0C: new_frame (imcc.l:752) 
     26==4322==    by 0x5100397: IMCC_push_parser_state (imcc.l:1263) 
     27==4322==    by 0x5102552: compile_to_bytecode (main.c:556) 
     28==4322==    by 0x51029C4: imcc_run (main.c:652) 
     29==4322==    by 0x401313: main (main.c:152) 
     30}}}}