kayws426 / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

Issue 192 revisited -- still broken in interactive mode. #193

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
r605 was intended to address issue 192, but does not do so for interactive mode.

What steps will reproduce the problem?
1. Enter the following at the command line / within picoc interactive mode:
Marks-MacBook-Air:picoc-608 heilpern$ ./picoc -i
starting picoc v2.2 beta r608
picoc> #include <stdio.h>
picoc> 
     > void printArray(void) {
     > #define SIZE 10
     >     int array[SIZE] = {5, 4, 3, 9, 1, 8, 6, 7, 5, 2};
     >     printf("4: %d\n", array[4]);
     > }
picoc> printArray();
Segmentation fault: 11

What is the expected output? What do you see instead?
Expected output is "4: 1" rather than the crash/segfault.

I've verified that running the test case for this change does in fact work; the 
crash only occurs from interactive mode.

What version of the product are you using? On what operating system?
r608 / OS X Mavericks

Original issue reported on code.google.com by m...@heilpern.com on 3 Mar 2014 at 9:31